Skip to content

[salt-cloud] [vmware] issue setting hostname on ubuntu  #55889

Closed as not planned

Description

@akurach

Description of Issue

salt-cloud vmware deployment from template hostname is not set. (Ubuntu 18, on rhel7 everything ok)

Setup

kr01.ubuntu.prd:
  - nfs.server:
      grains:
        roles:
          - nfs
      num_cpus: 4
      memory: 8GB
      devices:
        network:
          Network adapter 1:
            name: 'HIDDEN'
            ip: 'HIDDEN'
            gateway: 'HIDDEN'

Steps to Reproduce Issue

salt-cloud -m %mapname%

Result:

guest_id:
        ubuntu64Guest
    hostname:
        ubuntu
    id:
        nfs.server
   image:
        Ubuntu Linux (64-bit) (Detected)

Versions Report

[root@master srv]# salt --versions-report
Salt Version:
Salt: 2019.2.3

Dependency Versions:
cffi: 1.12.3
cherrypy: Not Installed
dateutil: 1.5
docker-py: 3.5.1
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.31.0
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Jun 11 2019, 14:33:56)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: redhat 7.7 Maipo
locale: UTF-8
machine: x86_64
release: 3.10.0-957.21.3.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.7 Maipo

Activity

  1. Ch3LL commented on Jan 16, 2020

    @Ch3LL
    Contributor

    is this occuring on all your OSs or just redhat7.7? Also is this new behavior, in other words was this working previously?

  2. added
    needs-more-info
    on Jan 16, 2020
  3. added this to the Blocked milestone on Jan 16, 2020
  4. akurach commented on Jan 17, 2020

    @akurach
    ContributorAuthor

    is this occuring on all your OSs or just redhat7.7? Also is this new behavior, in other words was this working previously?

    maybe i wrote not really correct.
    Master is installed on rhel7.7
    I'm deploying Ubuntu 18.06 via salt-cloud. and hostname remains default.
    with deploying rhel templates - no problem.

  5. akurach commented on Jan 20, 2020

    @akurach
    ContributorAuthor

    It looks like the problem in Ubuntu's Cloud.init
    if in the template set parameter preserve_hostname: to True
    everything works well.

    Maybe it will be nice to mention it somewhere. or add an option to do it via deployment.

    sed -i '/preserve_hostname: false/c\preserve_hostname: true' /etc/cloud/cloud.cfg && hostname -A > /etc/hostname
    
  6. Ch3LL commented on Feb 4, 2020

    @Ch3LL
    Contributor

    im not certain that everyone is using ubuntu cloud-init, but I agree it would probably be good to note in the documentation for salt-cloud that a user mgiht have to ensure preserve_hostname is set. will add as a documentation todo

  7. added
    bug
    documentation
    and removed
    needs-more-info
    on Feb 4, 2020
  8. modified the milestones: Blocked, Approved on Feb 4, 2020
  9. added
    severity-low
    on May 2, 2022
  10. dwoz commented on Oct 15, 2026

    @dwoz
    Contributor

    Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.

    Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.

    If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.

  11. dwoz commented on Oct 17, 2026

    @dwoz
    Contributor

    Reopening — there is an open PR tracking a fix for this: #69558.

  12. reopened this on Oct 17, 2026
  13. dwoz commented on Oct 24, 2026

    @dwoz
    Contributor

    Closing — the module/subsystem this issue tracks has been moved out of Salt core into the garethgreenaway/saltext-vmware extension. Please re-file against https://github.com/garethgreenaway/saltext-vmware/issues if it still reproduces there, including a reproduction and the output of salt --versions-report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Salt-Cloudbugdocumentationseverity-lowtime-estimate-single-day

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions