Add removal of the /etc/resolv.conf.save file for +bug/1567004
authormarios <marios@redhat.com>
Thu, 7 Apr 2016 13:39:46 +0000 (16:39 +0300)
committermarios <marios@redhat.com>
Thu, 7 Apr 2016 13:50:21 +0000 (16:50 +0300)
The change at https://review.openstack.org/#/c/302352/ should stop
the if up/down scripts from making changes to resolv.conf as
discussed in that review and the related bug below. However during
upgrades, as we are moving from a version of the ifcfg-vlanXX files
that don't have the PEERDNS=no added by /#/c/302352 the if up
script will restore the /etc/resolv.conf.save to /etc/resolv.conf
and overwrite it. This removes the .save file during the upgrade
init command which gets delivered to all nodes as the first stage
of a major upgrade.

Change-Id: I91dd139f43be4912c20d8661691bee2b662964d4
Related-Bug: 1567004

extraconfig/tasks/major_upgrade_pacemaker_init.yaml

index f662bc3..623549a 100644 (file)
@@ -30,6 +30,8 @@ parameters:
 
 resources:
 
+  # For the UpgradeInit also rename /etc/resolv.conf.save for +bug/1567004
+
   UpgradeInitConfig:
     type: OS::Heat::SoftwareConfig
     properties:
@@ -38,6 +40,7 @@ resources:
         list_join:
         - ''
         - - "#!/bin/bash\n\n"
+          - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
           - get_param: UpgradeInitCommand
 
   UpgradeInitControllerDeployment: