salt-cloud vmware provisioning offline minion bootstrap hangs when internet not reachable.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
When provisioning to target networks that have no internet access, it seems the bootstrap sh still tries to reach external mirrors. Or so it seems. (gleaned from our fw logs). Note that the source OS template is up to date and epel-release is installed and up to date.
[ ~]# cat /etc/salt/cloud.maps.d/somemap.map
somemap:
HOSTNAME.local:
devices:
network:
'Network adapter 1':
ip: [REDACTED]
name: '[REDACTED]'
gateway: ['[REDACTED]']
subnet_mask: [REDACTED]
minion:
master: [REDACTED]
startup_states: sls
sls_list:
- linux.scripts.update-hostname
[ ~]# cat /etc/salt/cloud.profiles.d/profile.conf
vmware-template:
deploy: True
provider: [REDACTED]
datacenter: [REDACTED]
clonefrom: 'CentOS76-MIN-1810-20190517-30G'
devices:
network:
'Network adapter 1':
switch_type: standard
domain: [REDACTED]
dns_servers:
- [REDACTED]
- [REDACTED]
ssh_username: [REDACTED]
password: [REDACTED]
customization: True
minion:
master: [REDACTED]
mine_functions:
network.ip_addrs: []
startup_states: sls
sls_list:
- linux.scripts.update-hostname
grains:
baselines:
- [REDACTED]
somemap:
host: [REDACTED]
cluster: [REDACTED]
datacenter: [REDACTED]
datastore: [REDACTED]
extends: vmware-template
folder: [REDACTED]
num_cpus: 8
cores_per_socket: 4
memory: 8GB
grains:
roles:
- [REDACTED]
business_unit: [REDACTED]
[ ~]# salt-cloud -m /etc/salt/cloud.maps.d/somemap.map -y -l debug --script-args "-I -R saltrepo.local/fullrepo"
...(lots of output)
* INFO: Running version: 2021.09.17
* INFO: Executed by:
* INFO: Command line: '/tmp/.saltcloud-f7486894-3904-4b74-8744-a7327dcf29d5/deploy.sh -c /tmp/.saltcloud-f7486894-3904-4b74-8744-a7327dcf29d5 -I -R saltrepo.local/fullrepo'
* WARN: Detected -R option. No other repositories will be configured when -R is used. Setting -r option to True.
* INFO: System Information:
* INFO: CPU: GenuineIntel
* INFO: CPU Arch: x86_64
* INFO: OS Name: Linux
* INFO: OS Version: 3.10.0-957.12.2.el7.x86_64
* INFO: Distribution: CentOS 7.6
* INFO: Installing minion
* INFO: Found function install_centos_stable_deps
* INFO: Found function config_salt
* INFO: Found function preseed_master
* INFO: Found function install_centos_stable
* INFO: Found function install_centos_st[DEBUG ] * INFO: Running version: 2021.09.17
* INFO: Executed by:
* INFO: Command line: '/tmp/.saltcloud-f7486894-3904-4b74-8744-a7327dcf29d5/deploy.sh -c /tmp/.saltcloud-f7486894-3904-4b74-8744-a7327dcf29d5 -I -R saltrepo.local/salt/fullrepo'
* WARN: Detected -R option. No other repositories will be configured when -R is used. Setting -r option to True.
* INFO: System Information:
* INFO: CPU: GenuineIntel
* INFO: CPU Arch: x86_64
* INFO: OS Name: Linux
* INFO: OS Version: 3.10.0-957.12.2.el7.x86_64
* INFO: Distribution: CentOS 7.6
* INFO: Installing minion
* INFO: Found function install_centos_stable_deps
* INFO: Found function config_salt
* INFO: Found function preseed_master
* INFO: Found function install_centos_stable
* INFO: Found function install_centos_st
able_post
* INFO: Found function install_centos_restart_daemons
* INFO: Found function daemons_running
* INFO: Found function install_centos_check_services
* INFO: Running install_centos_stable_deps()
* WARN: Detected -r or -R option while installing Salt packages for Python 3.
* WARN: Python 3 packages for older Salt releases requires the EPEL repository to be installed.
* WARN: Installing the EPEL repository automatically is disabled when using the -r or -R options.
[DEBUG ] able_post
* INFO: Found function install_centos_restart_daemons
* INFO: Found function daemons_running
* INFO: Found function install_centos_check_services
* INFO: Running install_centos_stable_deps()
* WARN: Detected -r or -R option while installing Salt packages for Python 3.
* WARN: Python 3 packages for older Salt releases requires the EPEL repository to be installed.
* WARN: Installing the EPEL repository automatically is disabled when using the -r or -R options.
...(hangs)
---
[ ~]# salt --versions-report
Salt Version:
Salt: 3004
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: centos 7 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1160.45.1.el7.x86_64
system: Linux
version: CentOS Linux 7 Core
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the salt-cloud provisioning command and the generated deploy.sh output, focusing on install_centos_stable_deps() and the -R repository path. Reproduce the CentOS 7.6 offline bootstrap with the supplied local repository and debug logging. Done means provisioning completes without attempting unreachable external mirrors or hanging during dependency installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100