From 752c41b017ad0da01408cd8af5eb019b3004b81d Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 26 Sep 2013 08:21:35 -0600 Subject: Import patches-unapplied version 1.3.2-0ubuntu5 to ubuntu/saucy-proposed Imported using git-ubuntu import. Changelog parent: 3b8f09910bb04cad24d151aff11c2908c5769125 New changelog entries: * disable ephemeral disk formating by default (LP: #1231490) --- debian/changelog | 6 ++++++ debian/patches/disable_disk_formating.patch | 16 ++++++++++++++++ debian/patches/series | 1 + 3 files changed, 23 insertions(+) create mode 100644 debian/patches/disable_disk_formating.patch diff --git a/debian/changelog b/debian/changelog index 68ace8c..2a66fee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +walinuxagent (1.3.2-0ubuntu5) saucy; urgency=low + + * disable ephemeral disk formating by default (LP: #1231490) + + -- Ben Howard Thu, 26 Sep 2013 08:21:35 -0600 + walinuxagent (1.3.2-0ubuntu4) saucy; urgency=low * debian/patches/shadow_permissions.patch: apply the appropriate diff --git a/debian/patches/disable_disk_formating.patch b/debian/patches/disable_disk_formating.patch new file mode 100644 index 0000000..feef91b --- /dev/null +++ b/debian/patches/disable_disk_formating.patch @@ -0,0 +1,16 @@ +Description: Disable disk formatting/mounting of ephemeral storage + Disabling this code segment as redundant with Cloud Init +Bug: https://bugs.launchpad.net/ubuntu/+bug/1231490 +Author: Ben Howard +Last-Update: 2013-09-26 +--- a/waagent ++++ b/waagent +@@ -2237,7 +2237,7 @@ Provisioning.RegenerateSshHostKeyPair=n + Provisioning.SshHostKeyPairType=rsa # Supported values are "rsa", "dsa" and "ecdsa". + Provisioning.MonitorHostName=n # Monitor host name changes and publish changes via DHCP requests. + +-ResourceDisk.Format=y # Format if unformatted. If 'n', resource disk will not be mounted. ++ResourceDisk.Format=n # Format if unformatted. If 'n', resource disk will not be mounted. + ResourceDisk.Filesystem=ext4 # + ResourceDisk.MountPoint=/mnt # + ResourceDisk.EnableSwap=n # Create and use swapfile on resource disk. diff --git a/debian/patches/series b/debian/patches/series index d355c91..25d7a66 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ no_udev_rule_removal.patch config_for_cloud-init.patch verbose_logging.patch shadow_permissions.patch +disable_disk_formating.patch -- cgit v1.2.3 From 4a5e1f2930d7642eb2035de39f895118dd218b3f Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 26 Sep 2013 08:21:35 -0600 Subject: no_udev_rule_removal.patch No DEP3 Subject or Description header found Gbp-Pq: no_udev_rule_removal.patch. --- waagent | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/waagent b/waagent index 4181eca..cb077b4 100644 --- a/waagent +++ b/waagent @@ -701,12 +701,13 @@ class EnvMonitor(object): dhcpcmd = "pidof dhclient3" dhcppid = RunGetOutput(dhcpcmd,chk_err=False)[1] while not self.shutdown: - for a in RulesFiles: - if os.path.isfile(a): - if os.path.isfile(GetLastPathElement(a)): - os.remove(GetLastPathElement(a)) - shutil.move(a, ".") - Log("EnvMonitor: Moved " + a + " -> " + LibDir) + if not IsDebian(): + for a in RulesFiles: + if os.path.isfile(a): + if os.path.isfile(GetLastPathElement(a)): + os.remove(GetLastPathElement(a)) + shutil.move(a, ".") + Log("EnvMonitor: Moved " + a + " -> " + LibDir) if publish != None and publish.lower().startswith("y"): try: if socket.gethostname() != self.HostName: @@ -2318,12 +2319,13 @@ def Install(): if UsesDpkg() and not Run("dpkg-query -s network-manager >/dev/null 2>&1",chk_err=False): # We want this to fail - supress error logging on error. Error(GuestAgentLongName + " is not compatible with network-manager.") return 1 - for a in RulesFiles: - if os.path.isfile(a): - if os.path.isfile(GetLastPathElement(a)): - os.remove(GetLastPathElement(a)) - shutil.move(a, ".") - Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) + if not IsDebian(): + for a in RulesFiles: + if os.path.isfile(a): + if os.path.isfile(GetLastPathElement(a)): + os.remove(GetLastPathElement(a)) + shutil.move(a, ".") + Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) ) if IsUbuntu() and not IsPackagedUbuntu(): # Support for Ubuntu's upstart configuration -- cgit v1.2.3 From f4f9d7e17f1638d9499df663d515508f04682dc1 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 26 Sep 2013 08:21:35 -0600 Subject: Disable provisioning components in config Gbp-Pq: config_for_cloud-init.patch. --- waagent | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/waagent b/waagent index cb077b4..980157d 100644 --- a/waagent +++ b/waagent @@ -2222,6 +2222,7 @@ exit 0 WaagentConf = """\ # # Windows Azure Linux Agent Configuration +# This configuration is modified to work with Cloud-init # Role.StateConsumer=None # Specified program is invoked with "Ready" or "Shutdown". @@ -2230,15 +2231,15 @@ Role.StateConsumer=None # Specified program is invoked with "Rea Role.ConfigurationConsumer=None # Specified program is invoked with XML file argument specifying role configuration. Role.TopologyConsumer=None # Specified program is invoked with XML file argument specifying role topology. -Provisioning.Enabled=y # -Provisioning.DeleteRootPassword=y # Password authentication for root account will be unavailable. -Provisioning.RegenerateSshHostKeyPair=y # Generate fresh host key pair. +Provisioning.Enabled=n # +Provisioning.DeleteRootPassword=n # Password authentication for root account will be unavailable. +Provisioning.RegenerateSshHostKeyPair=n # Generate fresh host key pair. Provisioning.SshHostKeyPairType=rsa # Supported values are "rsa", "dsa" and "ecdsa". -Provisioning.MonitorHostName=y # Monitor host name changes and publish changes via DHCP requests. +Provisioning.MonitorHostName=n # Monitor host name changes and publish changes via DHCP requests. ResourceDisk.Format=y # Format if unformatted. If 'n', resource disk will not be mounted. ResourceDisk.Filesystem=ext4 # -ResourceDisk.MountPoint=/mnt/resource # +ResourceDisk.MountPoint=/mnt # ResourceDisk.EnableSwap=n # Create and use swapfile on resource disk. ResourceDisk.SwapSizeMB=0 # Size of the swapfile. -- cgit v1.2.3 From 8ae1cdb8333c87208331bfbe9afc76c41f8062b4 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 26 Sep 2013 08:21:35 -0600 Subject: Use the proper log faculty for verbose logging (LP: #1193404). Gbp-Pq: verbose_logging.patch. --- waagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waagent b/waagent index 980157d..57c3ca3 100644 --- a/waagent +++ b/waagent @@ -456,7 +456,7 @@ def NoLog(message): def LogIfVerbose(message): if Verbose == True: - LogFileWithPrefix('',message) + LogWithPrefix('',message) def LogWithPrefixIfVerbose(prefix, message): if Verbose == True: -- cgit v1.2.3 From 07822677ea9d15508887d2a52fcb5d4f5edd312e Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 26 Sep 2013 08:21:35 -0600 Subject: Use the proper permissions on /etc/shadow (LP: #1188820). Gbp-Pq: shadow_permissions.patch. --- waagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waagent b/waagent index 57c3ca3..9a681aa 100644 --- a/waagent +++ b/waagent @@ -2423,7 +2423,7 @@ def DeleteRootPassword(): ReplaceFileContentsAtomic(filepath, "root:*LOCK*:14600::::::\n" + "\n".join(filter(lambda a: not a.startswith("root:"), GetFileContents(filepath).split('\n')))) - os.chmod(filepath, 0000) + os.chmod(filepath, 0640) if IsRedHat(): Run("chcon system_u:object_r:shadow_t:s0 " + filepath) Log("Root password deleted.") -- cgit v1.2.3 From c6ba998c06c09a65393866e77cc445f7a07b5d1d Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 26 Sep 2013 08:21:35 -0600 Subject: Disable disk formatting/mounting of ephemeral storage Gbp-Pq: disable_disk_formating.patch. --- waagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waagent b/waagent index 9a681aa..f0855d8 100644 --- a/waagent +++ b/waagent @@ -2237,7 +2237,7 @@ Provisioning.RegenerateSshHostKeyPair=n # Generate fresh host key pair. Provisioning.SshHostKeyPairType=rsa # Supported values are "rsa", "dsa" and "ecdsa". Provisioning.MonitorHostName=n # Monitor host name changes and publish changes via DHCP requests. -ResourceDisk.Format=y # Format if unformatted. If 'n', resource disk will not be mounted. +ResourceDisk.Format=n # Format if unformatted. If 'n', resource disk will not be mounted. ResourceDisk.Filesystem=ext4 # ResourceDisk.MountPoint=/mnt # ResourceDisk.EnableSwap=n # Create and use swapfile on resource disk. -- cgit v1.2.3