Drop --install-kolla option

This patch drops the --install-kolla option from the
undercloud containers installer. This package isn't a requirement
under any case (containers or not). I don't think we have plans to use
Kolla directly in this installer either.

Installing packages via Yum in quickstart or tripleo.sh should be just fine
here. No need to add options where we don't need them.

Change-Id: I8064cf96172201bab5ce3546fe2cbccb3f74f827
This commit is contained in:
Dan Prince 2017-06-13 16:27:03 -04:00
parent 127c35e62f
commit dd284c4a31
2 changed files with 8 additions and 26 deletions

View File

@ -90,21 +90,18 @@ class TestUndercloudDeploy(TestPluginV1):
@mock.patch('subprocess.check_call', autospec=True)
def test_install_prerequisites(self, mock_check_call):
mock_check_call.side_effect = [
True, subprocess.CalledProcessError(1, ''), True,
True, True,
subprocess.CalledProcessError(1, ''), True]
arglist = ['--install-kolla']
verifylist = [('install_kolla', True)]
cmd_parser = self.cmd.get_parser('check_parser')
parsed_args = cmd_parser.parse_args(arglist)
arglist = []
verifylist = []
self.check_parser(self.cmd, arglist, verifylist)
self.cmd._install_prerequisites(parsed_args.install_kolla)
self.cmd._install_prerequisites()
mock_check_call.assert_has_calls([
mock.call(['rpm', '-q', 'foo']),
mock.call(['rpm', '-q', 'bar']),
mock.call(['rpm', '-q', 'baz']),
mock.call(['rpm', '-q', 'openstack-kolla']),
mock.call(['yum', '-y', 'install', 'bar', 'openstack-kolla'])
mock.call(['yum', '-y', 'install', 'baz'])
])
@mock.patch('subprocess.check_call', autospec=True)
@ -113,11 +110,9 @@ class TestUndercloudDeploy(TestPluginV1):
True, subprocess.CalledProcessError(127, ''), True, True]
arglist = []
verifylist = []
cmd_parser = self.cmd.get_parser('check_parser')
parsed_args = cmd_parser.parse_args(arglist)
self.check_parser(self.cmd, arglist, verifylist)
try:
self.cmd._install_prerequisites(parsed_args.install_kolla)
self.cmd._install_prerequisites()
except Exception as e:
self.assertTrue('Failed to check for prerequisites: '
'bar, the exit status 127' in str(e))

View File

@ -15,7 +15,6 @@
from __future__ import print_function
import argparse
import itertools
import logging
import netaddr
import os
@ -84,13 +83,9 @@ class DeployUndercloud(command.Command):
p = subprocess.Popen(["hostname", "-s"], stdout=subprocess.PIPE)
return p.communicate()[0].rstrip()
def _install_prerequisites(self, add_kolla):
def _install_prerequisites(self):
print('Checking for installed prerequisites ...')
processed = []
if add_kolla:
self.prerequisites = itertools.chain(
self.prerequisites, ['openstack-kolla'])
for p in self.prerequisites:
try:
subprocess.check_call(['rpm', '-q', p])
@ -463,14 +458,6 @@ class DeployUndercloud(command.Command):
dest='keep_running',
help=_('Keep the process running on failures for debugging')
)
parser.add_argument(
'--install-kolla',
action='store_true',
dest='install_kolla',
default=False,
help=_('Require Kolla packages to be installed for building'
'containers from the undercloud node')
)
return parser
def take_action(self, parsed_args):
@ -501,7 +488,7 @@ class DeployUndercloud(command.Command):
raise exceptions.DeploymentError("Please run as root.")
# Install required packages
self._install_prerequisites(parsed_args.install_kolla)
self._install_prerequisites()
keystone_pid = self._fork_fake_keystone()