Remove OPM dependency resolution in prescript
Previously, the dependencies for the openstack-puppet-modules and openstack-packstack-puppet RPMs were being manually resolved and installed in any non-installer node (usually the controller). Since Newton, the OPM package is a meta-package, that includes all the puppet-* packages as dependencies. In this context, Packstack would try to install all puppet-* packages in all nodes, which is not needed and causes issues. We are solving this by removing the dependency resolution code, adding a new array to include OPM dependencies (only rubygem-json as of now) and installing them when needed. Note that, if a dependency is added to any puppet package, it will have to be added to Packstack as well. CI will notify us, though. Change-Id: I54d0c0296c0b57946e7af1f7fd13dae35c1c1a36
This commit is contained in:
@@ -83,10 +83,7 @@ except OSError:
|
|||||||
print ('Unable to create symbol link for log dir %s.' % LATEST_LOG_DIR)
|
print ('Unable to create symbol link for log dir %s.' % LATEST_LOG_DIR)
|
||||||
|
|
||||||
PUPPET_DEPENDENCIES = ['puppet', 'hiera', 'openssh-clients', 'tar', 'nc']
|
PUPPET_DEPENDENCIES = ['puppet', 'hiera', 'openssh-clients', 'tar', 'nc']
|
||||||
PUPPET_MODULES_PKGS = [
|
PUPPET_MODULES_DEPS = ['rubygem-json']
|
||||||
'openstack-puppet-modules',
|
|
||||||
'openstack-packstack-puppet'
|
|
||||||
]
|
|
||||||
|
|
||||||
FILE_INSTALLER_LOG = "setup.log"
|
FILE_INSTALLER_LOG = "setup.log"
|
||||||
|
|
||||||
|
|||||||
@@ -1309,25 +1309,7 @@ def preinstall_and_discover(config, messages):
|
|||||||
"""
|
"""
|
||||||
config['HOST_LIST'] = list(filtered_hosts(config))
|
config['HOST_LIST'] = list(filtered_hosts(config))
|
||||||
|
|
||||||
all_deps = ''
|
deps = list(basedefs.PUPPET_DEPENDENCIES) + list(basedefs.PUPPET_MODULES_DEPS)
|
||||||
for pkg in basedefs.PUPPET_MODULES_PKGS:
|
|
||||||
local = utils.ScriptRunner()
|
|
||||||
local.append(
|
|
||||||
'rpm -q --requires %s | egrep -v "^(rpmlib|\/|perl)"' % pkg
|
|
||||||
)
|
|
||||||
# this can fail if there are no dependencies other than those
|
|
||||||
# filtered out by the egrep expression.
|
|
||||||
rc, pkg_deps = local.execute(can_fail=False)
|
|
||||||
errmsg = '%s is not installed' % pkg
|
|
||||||
if errmsg in pkg_deps:
|
|
||||||
# modules package might not be installed if we are running
|
|
||||||
# from source; in this case we assume user knows what (s)he's
|
|
||||||
# doing and we don't install modules dependencies
|
|
||||||
continue
|
|
||||||
all_deps += ' ' + pkg_deps.strip()
|
|
||||||
|
|
||||||
deps = list(basedefs.PUPPET_DEPENDENCIES)
|
|
||||||
deps.extend([i.strip() for i in all_deps.split() if i.strip()])
|
|
||||||
|
|
||||||
details = {}
|
details = {}
|
||||||
for hostname in config['HOST_LIST']:
|
for hostname in config['HOST_LIST']:
|
||||||
|
|||||||
Reference in New Issue
Block a user