Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] salt-cloud - proxmox driver - change / update the ip_address parameter to reflect its usage #61136

Closed
2 tasks done
Tracked by #5
cavepopo opened this issue Oct 27, 2021 · 3 comments
Closed
2 tasks done
Tracked by #5
Assignees
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@cavepopo
Copy link
Contributor

cavepopo commented Oct 27, 2021

Description
When using dhcp as network configuration mode for LXC provisioning the parameter ip_address needs to be set to the fqdn, therefore the parma name seems odd.

Setup
Example of map file when using dhcp :

lxc-debian:
  - test-lxc.domain:
      ip_address: test-lxc.domain
      net0: name=eth0,bridge=vmbr0,ip=dhcp
      image: local:vztmpl/lxc-template-v1.1.tar.gz
  • on-prem machine (on proxmox host)
  • container (LXC through proxmox)

Steps to Reproduce the behavior
Create a LXC using salt-cloud and proxmox driver

Expected behavior
ip_address param to be renamed or at least documentation explicitly describes what this param is for in dhcp and fixed ip context

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3003.1
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: Not Installed
      dateutil: 2.7.3
     docker-py: Not Installed
         gitdb: 2.0.5
     gitpython: 2.1.11
        Jinja2: 2.10
       libgit2: 1.1.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: 2.6.1
  pycryptodome: 3.6.1
        pygit2: 1.6.1
        Python: 3.7.3 (default, Jan 22 2021, 20:04:44)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.1.2
         smmap: 2.0.5
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.1
 
System Versions:
          dist: debian 10 buster
        locale: utf-8
       machine: x86_64
       release: 5.4.140-1-pve
        system: Linux
       version: Debian GNU/Linux 10 buster
@mthibaut
Copy link
Contributor

mthibaut commented May 6, 2023

Actually the ip_address is not used in the API, and is completely ignored. So the above code does exactly the same as:

test-lxc.domain:
      net0: name=eth0,bridge=vmbr0,ip=dhcp
      image: local:vztmpl/lxc-template-v1.1.tar.gz

The hostname is derived from the name of the salt resource being created, which is whatever is used on the salt-cloud command line.

@cavepopo
Copy link
Contributor Author

cavepopo commented May 6, 2023

Thanks for the follow up

@cavepopo cavepopo closed this as completed May 6, 2023
@mthibaut
Copy link
Contributor

mthibaut commented May 10, 2023

This should be left open until the documentation is fixed. Also I found that this parameter is not actually unused. While unused in the API it is used by the salt proxmox code to determine the hostname to SSH to.

This means the current naming of the parameter is confusing, something like "ssh_host" would be more appropriate and in line with the existing ssh_username etc parameters. Also the parameters used to call the API should be separated more clearly from those used to configure the machine post-install.

Copied this to salt-extensions/saltext-proxmox#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

3 participants