diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/disable-auto-update.patch | 16 | ||||
-rw-r--r-- | debian/patches/disable_import_test.patch | 12 | ||||
-rw-r--r-- | debian/patches/fix-auto-update.patch | 70 | ||||
-rw-r--r-- | debian/patches/lp1623570-adjust-walinuxagent-service-after-and-wants.patch | 33 | ||||
-rw-r--r-- | debian/patches/series | 2 |
5 files changed, 17 insertions, 116 deletions
diff --git a/debian/patches/disable-auto-update.patch b/debian/patches/disable-auto-update.patch index 166c6ec..75e1d6b 100644 --- a/debian/patches/disable-auto-update.patch +++ b/debian/patches/disable-auto-update.patch @@ -1,9 +1,13 @@ ---- a/config/ubuntu/waagent.conf -+++ b/config/ubuntu/waagent.conf -@@ -82,5 +82,5 @@ +Index: walinuxagent-2.2.2/config/ubuntu/waagent.conf +=================================================================== +--- walinuxagent-2.2.2.orig/config/ubuntu/waagent.conf ++++ walinuxagent-2.2.2/config/ubuntu/waagent.conf +@@ -74,7 +74,7 @@ OS.OpensslPath=None # OS.EnableRDMA=y - # Enable or disable self-update, default is enabled --AutoUpdate.Enabled=y + # Enable or disable goal state processing auto-update, default is enabled +-# AutoUpdate.Enabled=y +AutoUpdate.Enabled=n - AutoUpdate.GAFamily=Prod + + # Determine the update family, this should not be changed + # AutoUpdate.GAFamily=Prod diff --git a/debian/patches/disable_import_test.patch b/debian/patches/disable_import_test.patch index cf3d167..14c0746 100644 --- a/debian/patches/disable_import_test.patch +++ b/debian/patches/disable_import_test.patch @@ -1,7 +1,9 @@ ---- a/config/waagent.conf -+++ b/config/waagent.conf -@@ -14,13 +14,13 @@ - Role.TopologyConsumer=None +Index: walinuxagent-2.2.2/config/waagent.conf +=================================================================== +--- walinuxagent-2.2.2.orig/config/waagent.conf ++++ walinuxagent-2.2.2/config/waagent.conf +@@ -3,13 +3,13 @@ + # # Enable instance creation -Provisioning.Enabled=y @@ -17,7 +19,7 @@ # Supported values are "rsa", "dsa" and "ecdsa". Provisioning.SshHostKeyPairType=rsa -@@ -44,14 +44,14 @@ +@@ -33,14 +33,14 @@ Provisioning.ExecuteCustomData=n Provisioning.AllowResetSysUser=n # Format if unformatted. If 'n', resource disk will not be mounted. diff --git a/debian/patches/fix-auto-update.patch b/debian/patches/fix-auto-update.patch deleted file mode 100644 index e4b632a..0000000 --- a/debian/patches/fix-auto-update.patch +++ /dev/null @@ -1,70 +0,0 @@ -Description: Fix potential infinite loop in agent updating -Origin: upstream, via email -Forwarded: not-needed -diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py -index e89608a..0541ca3 100644 ---- a/azurelinuxagent/ga/update.py -+++ b/azurelinuxagent/ga/update.py -@@ -379,14 +379,13 @@ class UpdateHandler(object): - """ - Load all non-blacklisted agents currently on disk. - """ -- if len(self.agents) <= 0: -- try: -- path = os.path.join(conf.get_lib_dir(), "{0}-*".format(AGENT_NAME)) -- self._set_agents([GuestAgent(path=agent_dir) -- for agent_dir in glob.iglob(path) if os.path.isdir(agent_dir)]) -- self._filter_blacklisted_agents() -- except Exception as e: -- logger.warn(u"Exception occurred loading available agents: {0}", ustr(e)) -+ try: -+ path = os.path.join(conf.get_lib_dir(), "{0}-*".format(AGENT_NAME)) -+ self._set_agents([GuestAgent(path=agent_dir) -+ for agent_dir in glob.iglob(path) if os.path.isdir(agent_dir)]) -+ self._filter_blacklisted_agents() -+ except Exception as e: -+ logger.warn(u"Exception occurred loading available agents: {0}", ustr(e)) - return - - def _purge_agents(self): -diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py -index 74804fb..89fe95d 100644 ---- a/tests/ga/test_update.py -+++ b/tests/ga/test_update.py -@@ -797,14 +797,14 @@ class TestUpdate(UpdateTestCase): - self.assertEqual(len(get_agents(self.tmp_dir)), len(self.update_handler.agents)) - return - -- def test_load_agents_does_not_reload(self): -+ def test_load_agents_does_reload(self): - self.prepare_agents() - - self.update_handler._load_agents() - agents = self.update_handler.agents - - self.update_handler._load_agents() -- self.assertEqual(agents, self.update_handler.agents) -+ self.assertNotEqual(agents, self.update_handler.agents) - return - - def test_load_agents_sorts(self): -@@ -945,7 +945,8 @@ class TestUpdate(UpdateTestCase): - self.assertEqual(0.0, latest_agent.error.last_failure) - self.assertEqual(0, latest_agent.error.failure_count) - -- self._test_run_latest(mock_child=ChildMock(return_value=1)) -+ with patch('azurelinuxagent.ga.update.UpdateHandler.get_latest_agent', return_value=latest_agent): -+ self._test_run_latest(mock_child=ChildMock(return_value=1)) - - self.assertTrue(latest_agent.is_available) - self.assertNotEqual(0.0, latest_agent.error.last_failure) -@@ -961,7 +962,8 @@ class TestUpdate(UpdateTestCase): - self.assertEqual(0.0, latest_agent.error.last_failure) - self.assertEqual(0, latest_agent.error.failure_count) - -- self._test_run_latest(mock_child=ChildMock(side_effect=Exception("Force blacklisting"))) -+ with patch('azurelinuxagent.ga.update.UpdateHandler.get_latest_agent', return_value=latest_agent): -+ self._test_run_latest(mock_child=ChildMock(side_effect=Exception("Force blacklisting"))) - - self.assertFalse(latest_agent.is_available) - self.assertTrue(latest_agent.error.is_blacklisted) diff --git a/debian/patches/lp1623570-adjust-walinuxagent-service-after-and-wants.patch b/debian/patches/lp1623570-adjust-walinuxagent-service-after-and-wants.patch deleted file mode 100644 index bb034cf..0000000 --- a/debian/patches/lp1623570-adjust-walinuxagent-service-after-and-wants.patch +++ /dev/null @@ -1,33 +0,0 @@ -Description: walinuxagent.service: adjust Wants and After - There is no reason for walinuxagent.service to Want - cloud-final.service. That could cause problems if cloud-init was - disabled. - . - There is also no reason for it to need to run After cloud-final. - Instead replace that with After of cloud-init. That will ensure - that cloud-init in its datasource code has an opportunity affect - walinuxagent before it starts. - . - The need for this is because cloud-init was starting walinux.service - during cloud-init.service, which would cause unresolvable - cyclic dependencies. -Author: Scott Moser <smoser@ubuntu.com> -Forwarded: https://github.com/Azure/WALinuxAgent/pull/426 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1623570 -Bug-Upstream: https://github.com/Azure/WALinuxAgent/issues/425 -Last-Update: 2016-09-14 - - ---- a/init/ubuntu/walinuxagent.service -+++ b/init/ubuntu/walinuxagent.service -@@ -7,8 +7,8 @@ - [Unit] - Description=Azure Linux Agent - --After=network-online.target cloud-final.service --Wants=network-online.target sshd.service sshd-keygen.service cloud-final.service -+After=network-online.target cloud-init.service -+Wants=network-online.target sshd.service sshd-keygen.service - - ConditionFileIsExecutable=/usr/sbin/waagent - ConditionPathExists=/etc/waagent.conf diff --git a/debian/patches/series b/debian/patches/series index bc0bd89..452e72a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,5 +2,3 @@ disable-auto-update.patch cloud-init-default-cfg.patch disable_import_test.patch disable_udev_overrides.patch -lp1623570-adjust-walinuxagent-service-after-and-wants.patch -fix-auto-update.patch |