Merge "Revert "Disable cloud-init network auto configuration"" into stable/newton

This commit is contained in:
Jenkins 2016-11-23 10:25:15 +00:00 committed by Gerrit Code Review
commit 7d35078a9d
2 changed files with 0 additions and 12 deletions

View File

@ -217,7 +217,6 @@ class BuildUtilsTestCase(unittest2.TestCase):
file_handle_mock = mock_open.return_value.__enter__.return_value
file_handle_mock.write.assert_called_once_with('manual\n')
mock_exec_expected_calls = [
mock.call('sed',
'-i',
@ -247,13 +246,9 @@ class BuildUtilsTestCase(unittest2.TestCase):
mock.call('chroot',
'etc/cloud/cloud.cfg.d/99-disable-network-config.cfg'),
mock.call('chroot', 'etc/cloud/cloud.cfg'),
mock.call('chroot', 'var/lib/cloud'),
mock.call('fake_path', 'data'),
mock.call('fake_path', 'data', 'upgraded-network'),
mock.call('/', bu.GRUB2_DMRAID_SETTINGS)]
self.assertEqual(mock_path_join_expected_calls,
mock_path.join.call_args_list)
mock_mkdir.assert_called_once_with('fake_path')
mock_symlink.assert_called_once_with('/dev/null', 'fake_path')
mock_yaml_dump.assert_called_with(mock.ANY,
mock.ANY,

View File

@ -225,13 +225,6 @@ def do_post_inst(chroot, hashed_root_password,
cloud_init_conf = os.path.join(chroot, 'etc/cloud/cloud.cfg')
if os.path.exists(cloud_init_conf):
fix_cloud_init_config(cloud_init_conf)
# NOTE(mzhnichkov): skip auto networking configuration at cloud-init stage
cloud_path = os.path.join(chroot, 'var/lib/cloud')
if os.path.exists(cloud_path):
os.mkdir(os.path.join(cloud_path, 'data'))
with open(os.path.join(cloud_path, 'data', 'upgraded-network'), 'w'):
pass
# NOTE(agordeev): remove custom policy-rc.d which is needed to disable
# execution of post/pre-install package hooks and start of services
remove_files(chroot, ['usr/sbin/policy-rc.d'])