[Bug 890501] Re: EC2 cloud-init overwrites 127.0.1.1 in /etc/hosts on every reboot

Eric Hammond esh at ubuntu.com
Tue Nov 15 01:25:47 UTC 2011


** Description changed:

  cloud-init sets up /etc/hosts with a default value for 127.0.1.1 looking
  something like:
  
-     127.0.1.1       ip-10-202-61-233.ec2.internal ip-10-202-61-233
+     127.0.1.1       ip-10-202-61-233.ec2.internal ip-10-202-61-233
  
  I edit /etc/hosts to change this value to something that makes more
  sense to my internal software (e.g., Apache), say:
  
-     127.0.1.1       myhost.example.com myhost
+     127.0.1.1       myhost.example.com myhost
  
  BUG: Whenever I reboot the EC2 instance, cloud-init overwrites my
  important settings of this value back to the old default.  This breaks
  the startup of my applications on the server as they expect to be able
  to resolve the names I want set in the /etc/hosts file.
  
  Once the user edits the value for 127.0.1.1 in the /etc/hosts file, it
  should never be overwritten.  Not on a reboot.  Not on a stop/start
  (which assigns new IP addresses).  Not even when an AMI is built out of
  this instance and a new instance is run.
  
  The user changed that value to something they cared about with reasons
  we can't assume to trump.  It should be left alone.
  
  If /etc/hosts does not exist or if 127.0.1.1 is still the same value
  that cloud-init last set it to, then it *might* be acceptable to
  overwrite it with a value based on a change in the private IP address,
  HOWEVER, this might still break the application if software configured
  itself using the old value.
  
  Either never change the value if it exists, or store elsewhere the value
  that was initially set and only change it if it is still the same.
  
- See also #371936 where a similar bug was fixed back in 2009.  Figure out
- if there is some reason that this part of the system is fragile and
+ See also bug #371936 where a similar bug was fixed back in 2009.  Figure
+ out if there is some reason that this part of the system is fragile and
  prone to breaking.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: cloud-init 0.6.1-0ubuntu22
  ProcVersionSignature: User Name 3.0.0-12.20-virtual 3.0.4
  Uname: Linux 3.0.0-12-virtual i686
  ApportVersion: 1.23-0ubuntu3
  Architecture: i386
  Date: Tue Nov 15 00:17:46 2011
  Ec2AMI: ami-a7f539ce
  Ec2AMIManifest: (unknown)
  Ec2AvailabilityZone: us-east-1d
  Ec2InstanceType: t1.micro
  Ec2Kernel: aki-805ea7e9
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

- cloud-init sets up /etc/hosts with a default value for 127.0.1.1 looking
- something like:
+ When running an EC2 instance on Ubuntu 11.10 Oneiric, cloud-init sets up
+ /etc/hosts with a default value for 127.0.1.1 looking something like:
  
      127.0.1.1       ip-10-202-61-233.ec2.internal ip-10-202-61-233
  
  I edit /etc/hosts to change this value to something that makes more
  sense to my internal software (e.g., Apache), say:
  
      127.0.1.1       myhost.example.com myhost
  
  BUG: Whenever I reboot the EC2 instance, cloud-init overwrites my
  important settings of this value back to the old default.  This breaks
  the startup of my applications on the server as they expect to be able
  to resolve the names I want set in the /etc/hosts file.
  
  Once the user edits the value for 127.0.1.1 in the /etc/hosts file, it
  should never be overwritten.  Not on a reboot.  Not on a stop/start
  (which assigns new IP addresses).  Not even when an AMI is built out of
  this instance and a new instance is run.
  
  The user changed that value to something they cared about with reasons
  we can't assume to trump.  It should be left alone.
  
  If /etc/hosts does not exist or if 127.0.1.1 is still the same value
  that cloud-init last set it to, then it *might* be acceptable to
  overwrite it with a value based on a change in the private IP address,
  HOWEVER, this might still break the application if software configured
  itself using the old value.
  
  Either never change the value if it exists, or store elsewhere the value
  that was initially set and only change it if it is still the same.
  
  See also bug #371936 where a similar bug was fixed back in 2009.  Figure
  out if there is some reason that this part of the system is fragile and
  prone to breaking.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: cloud-init 0.6.1-0ubuntu22
  ProcVersionSignature: User Name 3.0.0-12.20-virtual 3.0.4
  Uname: Linux 3.0.0-12-virtual i686
  ApportVersion: 1.23-0ubuntu3
  Architecture: i386
  Date: Tue Nov 15 00:17:46 2011
  Ec2AMI: ami-a7f539ce
  Ec2AMIManifest: (unknown)
  Ec2AvailabilityZone: us-east-1d
  Ec2InstanceType: t1.micro
  Ec2Kernel: aki-805ea7e9
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

- When running an EC2 instance on Ubuntu 11.10 Oneiric, cloud-init sets up
+ When running an EC2 instance of Ubuntu 11.10 Oneiric, cloud-init sets up
  /etc/hosts with a default value for 127.0.1.1 looking something like:
  
      127.0.1.1       ip-10-202-61-233.ec2.internal ip-10-202-61-233
  
  I edit /etc/hosts to change this value to something that makes more
  sense to my internal software (e.g., Apache), say:
  
      127.0.1.1       myhost.example.com myhost
  
  BUG: Whenever I reboot the EC2 instance, cloud-init overwrites my
  important settings of this value back to the old default.  This breaks
  the startup of my applications on the server as they expect to be able
  to resolve the names I want set in the /etc/hosts file.
  
  Once the user edits the value for 127.0.1.1 in the /etc/hosts file, it
  should never be overwritten.  Not on a reboot.  Not on a stop/start
  (which assigns new IP addresses).  Not even when an AMI is built out of
  this instance and a new instance is run.
  
  The user changed that value to something they cared about with reasons
  we can't assume to trump.  It should be left alone.
  
  If /etc/hosts does not exist or if 127.0.1.1 is still the same value
  that cloud-init last set it to, then it *might* be acceptable to
  overwrite it with a value based on a change in the private IP address,
  HOWEVER, this might still break the application if software configured
  itself using the old value.
  
  Either never change the value if it exists, or store elsewhere the value
  that was initially set and only change it if it is still the same.
  
  See also bug #371936 where a similar bug was fixed back in 2009.  Figure
  out if there is some reason that this part of the system is fragile and
  prone to breaking.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: cloud-init 0.6.1-0ubuntu22
  ProcVersionSignature: User Name 3.0.0-12.20-virtual 3.0.4
  Uname: Linux 3.0.0-12-virtual i686
  ApportVersion: 1.23-0ubuntu3
  Architecture: i386
  Date: Tue Nov 15 00:17:46 2011
  Ec2AMI: ami-a7f539ce
  Ec2AMIManifest: (unknown)
  Ec2AvailabilityZone: us-east-1d
  Ec2InstanceType: t1.micro
  Ec2Kernel: aki-805ea7e9
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

  When running an EC2 instance of Ubuntu 11.10 Oneiric, cloud-init sets up
  /etc/hosts with a default value for 127.0.1.1 looking something like:
  
      127.0.1.1       ip-10-202-61-233.ec2.internal ip-10-202-61-233
  
  I edit /etc/hosts to change this value to something that makes more
- sense to my internal software (e.g., Apache), say:
+ sense to my internal software (e.g., Apache).  For example:
  
      127.0.1.1       myhost.example.com myhost
  
  BUG: Whenever I reboot the EC2 instance, cloud-init overwrites my
  important settings of this value back to the old default.  This breaks
  the startup of my applications on the server as they expect to be able
  to resolve the names I want set in the /etc/hosts file.
  
  Once the user edits the value for 127.0.1.1 in the /etc/hosts file, it
  should never be overwritten.  Not on a reboot.  Not on a stop/start
  (which assigns new IP addresses).  Not even when an AMI is built out of
  this instance and a new instance is run.
  
  The user changed that value to something they cared about with reasons
  we can't assume to trump.  It should be left alone.
  
  If /etc/hosts does not exist or if 127.0.1.1 is still the same value
  that cloud-init last set it to, then it *might* be acceptable to
  overwrite it with a value based on a change in the private IP address,
  HOWEVER, this might still break the application if software configured
  itself using the old value.
  
  Either never change the value if it exists, or store elsewhere the value
  that was initially set and only change it if it is still the same.
  
  See also bug #371936 where a similar bug was fixed back in 2009.  Figure
  out if there is some reason that this part of the system is fragile and
  prone to breaking.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: cloud-init 0.6.1-0ubuntu22
  ProcVersionSignature: User Name 3.0.0-12.20-virtual 3.0.4
  Uname: Linux 3.0.0-12-virtual i686
  ApportVersion: 1.23-0ubuntu3
  Architecture: i386
  Date: Tue Nov 15 00:17:46 2011
  Ec2AMI: ami-a7f539ce
  Ec2AMIManifest: (unknown)
  Ec2AvailabilityZone: us-east-1d
  Ec2InstanceType: t1.micro
  Ec2Kernel: aki-805ea7e9
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

  When running an EC2 instance of Ubuntu 11.10 Oneiric, cloud-init sets up
  /etc/hosts with a default value for 127.0.1.1 looking something like:
  
      127.0.1.1       ip-10-202-61-233.ec2.internal ip-10-202-61-233
  
  I edit /etc/hosts to change this value to something that makes more
  sense to my internal software (e.g., Apache).  For example:
  
      127.0.1.1       myhost.example.com myhost
  
  BUG: Whenever I reboot the EC2 instance, cloud-init overwrites my
  important settings of this value back to the old default.  This breaks
  the startup of my applications on the server as they expect to be able
- to resolve the names I want set in the /etc/hosts file.
+ to resolve the names I want set in the /etc/hosts file.  My web server
+ never comes up after a simple reboot.
  
  Once the user edits the value for 127.0.1.1 in the /etc/hosts file, it
  should never be overwritten.  Not on a reboot.  Not on a stop/start
  (which assigns new IP addresses).  Not even when an AMI is built out of
  this instance and a new instance is run.
  
  The user changed that value to something they cared about with reasons
  we can't assume to trump.  It should be left alone.
  
  If /etc/hosts does not exist or if 127.0.1.1 is still the same value
  that cloud-init last set it to, then it *might* be acceptable to
  overwrite it with a value based on a change in the private IP address,
  HOWEVER, this might still break the application if software configured
  itself using the old value.
  
  Either never change the value if it exists, or store elsewhere the value
  that was initially set and only change it if it is still the same.
  
  See also bug #371936 where a similar bug was fixed back in 2009.  Figure
  out if there is some reason that this part of the system is fragile and
  prone to breaking.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: cloud-init 0.6.1-0ubuntu22
  ProcVersionSignature: User Name 3.0.0-12.20-virtual 3.0.4
  Uname: Linux 3.0.0-12-virtual i686
  ApportVersion: 1.23-0ubuntu3
  Architecture: i386
  Date: Tue Nov 15 00:17:46 2011
  Ec2AMI: ami-a7f539ce
  Ec2AMIManifest: (unknown)
  Ec2AvailabilityZone: us-east-1d
  Ec2InstanceType: t1.micro
  Ec2Kernel: aki-805ea7e9
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/890501

Title:
  EC2 cloud-init overwrites 127.0.1.1 in /etc/hosts on every reboot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/890501/+subscriptions



More information about the Ubuntu-server-bugs mailing list