From 51d3078157102586a4f9196dba52bb6298075276 Mon Sep 17 00:00:00 2001 From: Sergii Golovatiuk Date: Wed, 16 Nov 2016 13:03:53 +0000 Subject: [PATCH] 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 faa9de1780f0c7e3a4202d67a11a83ea66a13803. Change-Id: I93a7fa29ae932b0020a4dad17e580808ee3fb117 Signed-off-by: Sergii Golovatiuk --- fuel_agent/tests/test_build_utils.py | 5 ----- fuel_agent/utils/build.py | 7 ------- 2 files changed, 12 deletions(-) diff --git a/fuel_agent/tests/test_build_utils.py b/fuel_agent/tests/test_build_utils.py index 7aa92984..d5ce0fdd 100644 --- a/fuel_agent/tests/test_build_utils.py +++ b/fuel_agent/tests/test_build_utils.py @@ -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', diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py index 36c9f213..0d99f6d0 100644 --- a/fuel_agent/utils/build.py +++ b/fuel_agent/utils/build.py @@ -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'])