Revert "Disable cloud-init network auto configuration"

This fix doesn't fix the problem. I still see 50-cloud-init.cfg in /etc/network/interfaces.d/

This reverts commit faa9de1780.

Change-Id: I93a7fa29ae932b0020a4dad17e580808ee3fb117
Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
This commit is contained in:
Sergii Golovatiuk 2016-11-16 13:03:53 +00:00
parent 0fd70bb712
commit 51d3078157
2 changed files with 0 additions and 12 deletions

View File

@ -216,7 +216,6 @@ class BuildUtilsTestCase(unittest2.TestCase):
pipeline_depth_file='fake_pipeline_depth')
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',
@ -243,13 +242,9 @@ class BuildUtilsTestCase(unittest2.TestCase):
mock.call('chroot', 'etc/systemd/system'),
mock.call('chroot', 'etc/systemd/system/mcollective.service'),
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.patch('fuel_agent.utils.build.open',

View File

@ -216,13 +216,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'])