From 7c19244725bac484f17669de0ccfd2dac4bf272d Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 6 Nov 2014 16:33:42 -0700 Subject: Import patches-unapplied version 2.0.8-0ubuntu2 to ubuntu/vivid-proposed Imported using git-ubuntu import. Changelog parent: 229205d15160a8de34b7afdbf5cbbb49fdc1c061 New changelog entries: * Add upstart job to add "readme" on Azure ephemeral disk (LP: #1382257). --- debian/changelog | 6 ++++++ debian/ephemeral-disk-warning.conf | 37 +++++++++++++++++++++++++++++++++++++ debian/install | 1 + 3 files changed, 44 insertions(+) create mode 100644 debian/ephemeral-disk-warning.conf diff --git a/debian/changelog b/debian/changelog index 7aff48f..7654706 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +walinuxagent (2.0.8-0ubuntu2) vivid; urgency=medium + + * Add upstart job to add "readme" on Azure ephemeral disk (LP: #1382257). + + -- Ben Howard Thu, 06 Nov 2014 16:33:42 -0700 + walinuxagent (2.0.8-0ubuntu1) utopic; urgency=medium * New upstream release (LP: #1356479). diff --git a/debian/ephemeral-disk-warning.conf b/debian/ephemeral-disk-warning.conf new file mode 100644 index 0000000..2081381 --- /dev/null +++ b/debian/ephemeral-disk-warning.conf @@ -0,0 +1,37 @@ +# ephemeral-disk-warning - warns user that the disk is really, really ephemeral +# +# On Azure, the ephemeral disk is extremely ephemeral; the ephemeral disk is +# unsafe between boots. This places a file on /mnt that warns the user +# that the disk is a dangerous place for storing data of any importance. + +start on (mounted MOUNTPOINT=/mnt and started cloud-final) +task +script + dev_sdb_mp=$(mount | awk '/sdb1/{print$3}') + warn_file="$dev_sdb_mp/DATALOSS_WARNING_README.txt" + if [ -z "$dev_sdb_mp" ]; then + logger "Unable to discover /dev/sdb1's mount point, ephemeral warning will not be written" + exit 0 + else + logger "Ephemeral disk /dev/sdb located at $dev_sdb_mp" + fi + + if [ ! -e "$warn_file" ]; then + cat >> $warn_file <<"EOF" +WARNING: THIS IS A TEMPORARY DISK. + +Any data stored on this drive is SUBJECT TO LOSS and THERE IS NO WAY TO +RECOVER IT. + +Please do not use this disk for storing any personal or application data. + +For additional details to please refer to the MSDN documentation at: +http://msdn.microsoft.com/en-us/library/windowsazure/jj672979.aspx +EOF + chmod 0444 $warn_file + chattr +i $warn_file + logger "Added ephemeral disk warning to $warn_file" + fi + logger "WARNING: $dev_sdb_mp is an ephemeral disk. See $warn_file for more information" + +end script diff --git a/debian/install b/debian/install index f315729..3f1da87 100644 --- a/debian/install +++ b/debian/install @@ -1 +1,2 @@ config/91_walinuxagent.cfg etc/cloud/cloud.cfg.d +debian/ephemeral-disk-warning.conf etc/init -- cgit v1.2.3 From 19e4f23671108be3b3f947fc22b8f4ae75b7ee8a Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 6 Nov 2014 16:33:42 -0700 Subject: Prevent the removal of udev rules by agent Gbp-Pq: disable-udev-rules.patch. --- waagent | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/waagent b/waagent index fcaa71e..eb6a64b 100644 --- a/waagent +++ b/waagent @@ -90,8 +90,7 @@ ExtensionChildren = [] VMM_STARTUP_SCRIPT_NAME='install' VMM_CONFIG_FILE_NAME='linuxosconfiguration.xml' global RulesFiles -RulesFiles = [ "/lib/udev/rules.d/75-persistent-net-generator.rules", - "/etc/udev/rules.d/70-persistent-net.rules" ] +RulesFiles = [] VarLibDhcpDirectories = ["/var/lib/dhclient", "/var/lib/dhcpcd", "/var/lib/dhcp"] EtcDhcpClientConfFiles = ["/etc/dhcp/dhclient.conf", "/etc/dhcp3/dhclient.conf"] global LibDir -- cgit v1.2.3 From e1271deeeb4110351e3fa5f8da6e658c183f0244 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 6 Nov 2014 16:33:42 -0700 Subject: Disable provisioning Gbp-Pq: disable_provisioning.patch. --- config/waagent.conf | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/config/waagent.conf b/config/waagent.conf index c7cb96a..5e26508 100644 --- a/config/waagent.conf +++ b/config/waagent.conf @@ -1,6 +1,9 @@ # # Windows Azure Linux Agent Configuration # +# Ubuntu uses Cloud-init to provision on Windows Azure. This configuration +# file is used to ensure that cloud-init does the prep of the disk +# # Specified program is invoked with the argument "Ready" when we report ready status # to the endpoint server. @@ -14,29 +17,29 @@ Role.ConfigurationConsumer=None Role.TopologyConsumer=None # Enable instance creation -Provisioning.Enabled=y +Provisioning.Enabled=n # Password authentication for root account will be unavailable. -Provisioning.DeleteRootPassword=y +Provisioning.DeleteRootPassword=n # Generate fresh host key pair. -Provisioning.RegenerateSshHostKeyPair=y +Provisioning.RegenerateSshHostKeyPair=n # Supported values are "rsa", "dsa" and "ecdsa". Provisioning.SshHostKeyPairType=rsa # Monitor host name changes and publish changes via DHCP requests. -Provisioning.MonitorHostName=y +Provisioning.MonitorHostName=n # Format if unformatted. If 'n', resource disk will not be mounted. -ResourceDisk.Format=y +ResourceDisk.Format=n # File system on the resource disk # Typically ext3 or ext4. FreeBSD images should use 'ufs2' here. ResourceDisk.Filesystem=ext4 -# ount point for the resource disk -ResourceDisk.MountPoint=/mnt/resource +# Mount point for the resource disk +ResourceDisk.MountPoint=/mnt # Create and use swapfile on resource disk. ResourceDisk.EnableSwap=n -- cgit v1.2.3 From 6113f5771b25015cf4f62126d4052701d965545a Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 6 Nov 2014 16:33:42 -0700 Subject: fixup_setup_file.patch No DEP3 Subject or Description header found Gbp-Pq: fixup_setup_file.patch. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 846d8e7..5af4797 100755 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ class InstallData(install): def initialize_options(self): install.initialize_options(self) - self.init_system = 'sysV' + self.init_system = 'upstart' self.lnx_distro = None def finalize_options(self): -- cgit v1.2.3 From 10e883553b15ca9bb3d4a2323817db92fdd9b747 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 6 Nov 2014 16:33:42 -0700 Subject: cloud-init-default-cfg.patch No DEP3 Subject or Description header found Gbp-Pq: cloud-init-default-cfg.patch. --- config/91_walinuxagent.cfg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/91_walinuxagent.cfg diff --git a/config/91_walinuxagent.cfg b/config/91_walinuxagent.cfg new file mode 100644 index 0000000..b7049fc --- /dev/null +++ b/config/91_walinuxagent.cfg @@ -0,0 +1,3 @@ +# This configuration file is provided by the WALinuxAgent package. +datasource_list: [ Azure ] + -- cgit v1.2.3 From 9696f583a0ef57eb564ed43e12c295ccd53e0daa Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 6 Nov 2014 16:33:42 -0700 Subject: Fix for broken sshd configuration (LP: #1305418) Gbp-Pq: sshd_config_newline_fix.patch. --- waagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waagent b/waagent index eb6a64b..2c69ceb 100644 --- a/waagent +++ b/waagent @@ -3838,7 +3838,7 @@ class OvfEnv(object): # Disable RFC 4252 and RFC 4256 authentication schemes. ReplaceFileContentsAtomic(filepath, "\n".join(filter(lambda a: not (a.startswith("PasswordAuthentication") or a.startswith("ChallengeResponseAuthentication")), - GetFileContents(filepath).split('\n'))) + "PasswordAuthentication no\nChallengeResponseAuthentication no\n") + GetFileContents(filepath).split('\n'))) + "\nPasswordAuthentication no\nChallengeResponseAuthentication no\n") Log("Disabled SSH password-based authentication methods.") if self.AdminPassword != None: MyDistro.changePass('root',self.AdminPassword) -- cgit v1.2.3