From 9afda2f6662f4f90341109d5a8207d6fc14f8707 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Fri, 26 Feb 2016 11:06:35 -0700 Subject: Import patches-unapplied version 2.1.3-0ubuntu3 to ubuntu/xenial-proposed Imported using git-ubuntu import. Changelog parent: e509d6821647aee2965c78bbfe8548a66a06ce0d New changelog entries: * Remove conflict with NetworkManager (LP: #1550461): - devices on the hyperv bus are ignored via new udev rule. * Made the upstart job more consistant with systemd service to use the /dev/disk/azure/resource-part1 path instead of /dev/sdb (LP: #1544764) --- debian/68-azure-nm-unmanaged.rules | 4 ++++ debian/changelog | 9 +++++++++ debian/control | 1 - debian/ephemeral-disk-warning.conf | 27 ++++++++++++++++++++------- debian/ephemeral-disk-warning.sh | 6 +++++- debian/install | 1 + 6 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 debian/68-azure-nm-unmanaged.rules diff --git a/debian/68-azure-nm-unmanaged.rules b/debian/68-azure-nm-unmanaged.rules new file mode 100644 index 0000000..ce38183 --- /dev/null +++ b/debian/68-azure-nm-unmanaged.rules @@ -0,0 +1,4 @@ +# When WALinuxAgent is installed, then don't allow for network-manager +# to manage the interface. +# +ENV{INTERFACE}=="eth[0-9]*", ENV{ID_NET_DRIVER}=="hv_netvsc", ENV{NM_UNMANAGED}="1" diff --git a/debian/changelog b/debian/changelog index 4107d02..ccf5886 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +walinuxagent (2.1.3-0ubuntu3) xenial; urgency=medium + + * Remove conflict with NetworkManager (LP: #1550461): + - devices on the hyperv bus are ignored via new udev rule. + * Made the upstart job more consistant with systemd service to use the + /dev/disk/azure/resource-part1 path instead of /dev/sdb (LP: #1544764) + + -- Ben Howard Fri, 26 Feb 2016 11:06:35 -0700 + walinuxagent (2.1.3-0ubuntu2) xenial; urgency=medium * Fixed file shebangs to use python3. diff --git a/debian/control b/debian/control index 3e561e0..f8a00bb 100644 --- a/debian/control +++ b/debian/control @@ -23,7 +23,6 @@ Depends: cloud-init (>=0.7.3~bzr826-0ubuntu2), ${misc:Depends}, ${python:Depends} Recommends: linux-image-extra-virtual -Conflicts: network-manager Description: Windows Azure Linux Agent The Windows Azure Linux Agent supports the provisioning and running of Linux VMs in the Windows Azure cloud. This package should be installed on Linux diff --git a/debian/ephemeral-disk-warning.conf b/debian/ephemeral-disk-warning.conf index 714ee99..39d54d1 100644 --- a/debian/ephemeral-disk-warning.conf +++ b/debian/ephemeral-disk-warning.conf @@ -4,20 +4,29 @@ # 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. +env RESOURCE_DISK=/dev/disk/azure/resource-part1 + start on (stopped rc RUNLEVEL=[2345] and stopped cloud-config) 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" + if [ ! -e $RESOURCE_DISK ]; then + logger "Disk $RESOURCE_DISK does not exist, skipping ephemeral warning" + exit 0 + fi + + ephemeral_kdev=$(readlink -f $RESOURCE_DISK) + ephemeral_mp=$(awk '$1==kd {print$2}' "kd=$ephemeral_kdev" /proc/mounts) + warn_file="$ephemeral_mp/DATALOSS_WARNING_README.txt" + + if [ -z "$ephemeral_mp" ]; then + logger "Unable to discover mount point of $ephemeral_kdev. Ephemeral warning will not be written" exit 0 else - logger "Ephemeral disk /dev/sdb located at $dev_sdb_mp" + logger "Ephemeral disk $ephemeral_kdev located at $ephemeral_mp" fi if [ ! -e "$warn_file" ]; then - cat >> $warn_file <<"EOF" + cat >> $warn_file < Date: Fri, 26 Feb 2016 11:06:35 -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 632647b3fb2eace5e773aa2af33b3a1244364424 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Fri, 26 Feb 2016 11:06:35 -0700 Subject: disable_import_test.patch No DEP3 Subject or Description header found Gbp-Pq: disable_import_test.patch. --- config/waagent.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/waagent.conf b/config/waagent.conf index e808117..d741734 100644 --- a/config/waagent.conf +++ b/config/waagent.conf @@ -14,13 +14,13 @@ 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 @@ -44,14 +44,14 @@ Provisioning.ExecuteCustomData=n Provisioning.AllowResetSysUser=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 # Mount point for the resource disk -ResourceDisk.MountPoint=/mnt/resource +ResourceDisk.MountPoint=/mnt # Create and use swapfile on resource disk. ResourceDisk.EnableSwap=n -- cgit v1.2.3 From 6719463a8dcc1e10703a72f012615ee7bcd08f4b Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Fri, 26 Feb 2016 11:06:35 -0700 Subject: disable_udev_overrides.patch No DEP3 Subject or Description header found Gbp-Pq: disable_udev_overrides.patch. --- azurelinuxagent/distro/ubuntu/osutil.py | 12 ++++++------ bin/waagent2.0 | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/azurelinuxagent/distro/ubuntu/osutil.py b/azurelinuxagent/distro/ubuntu/osutil.py index cc4b8ef..5fdb2ed 100644 --- a/azurelinuxagent/distro/ubuntu/osutil.py +++ b/azurelinuxagent/distro/ubuntu/osutil.py @@ -44,6 +44,12 @@ class Ubuntu14OSUtil(DefaultOSUtil): def start_agent_service(self): return shellutil.run("service walinuxagent start", chk_err=False) + def remove_rules_files(self, rules_files=""): + pass + + def restore_rules_files(self, rules_files=""): + pass + class Ubuntu12OSUtil(Ubuntu14OSUtil): def __init__(self): super(Ubuntu12OSUtil, self).__init__() @@ -67,9 +73,3 @@ class UbuntuSnappyOSUtil(Ubuntu14OSUtil): def __init__(self): super(UbuntuSnappyOSUtil, self).__init__() self.conf_file_path = '/apps/walinuxagent/current/waagent.conf' - - def remove_rules_files(self, rules_files=""): - pass - - def restore_rules_files(self, rules_files=""): - pass diff --git a/bin/waagent2.0 b/bin/waagent2.0 index 673a04c..e946f1e 100644 --- a/bin/waagent2.0 +++ b/bin/waagent2.0 @@ -95,8 +95,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 4021cdee90c6d820752738704b3681039eec1bc3 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Fri, 26 Feb 2016 11:06:35 -0700 Subject: fix_shebangs.patch No DEP3 Subject or Description header found Gbp-Pq: fix_shebangs.patch. --- bin/waagent | 2 +- bin/waagent2.0 | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/waagent b/bin/waagent index e65bc0c..03333c7 100755 --- a/bin/waagent +++ b/bin/waagent @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Azure Linux Agent # diff --git a/bin/waagent2.0 b/bin/waagent2.0 index e946f1e..b77d6ab 100644 --- a/bin/waagent2.0 +++ b/bin/waagent2.0 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Azure Linux Agent # diff --git a/setup.py b/setup.py index c799787..896528e 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3n3n3 # # Microsoft Azure Linux Agent setup.py # -- cgit v1.2.3