[SRU] GCE datasource should use the short hostname

Bug #1383794 reported by Ben Howard
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Unassigned
cloud-init (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Unassigned
Utopic
Fix Released
Medium
Unassigned

Bug Description

[IMPACT] Since GCE FQDN are usually longer than 64-characters, several hi-profile tools like Java and Hadoop may break.

[FIX] Per GCE's recommendation, Linux instances should use the short hostname over the FQDN. This change sets the system hostname to the short name.

[VERIFICATION]
1. Install new cloud-init from proposed
2. Re-run cloud-config:
   * 14.04/14.10: cloud-init single -n set_hostname --frequency=always
   * 12.04: cloud-init-cfg set_hostname always
3. Check to make sure that the short name is used for /etc/hostname

[RISK] This is a very low risk change. The actual change is a single line, and has test cases for 14.04 and 14.10. Further, since this change is only in the GCE datasource, it only affects GCE instances.

[ORIGINAL REPORT]
The GCE datasource uses the long hostname. Hostnames longer than 64 characters can break several tools.

Related branches

affects: ubuntu → cloud-init (Ubuntu)
summary: - GCE datasource should use the short hostname
+ [SRU] GCE datasource should use the short hostname
description: updated
description: updated
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Original set of patches is nearly three months old. Rebased the patch for the latest Cloud-init. Checked to make sure that the debdiff and patches still apply cleanly.

Requested MP on the upstream bits.

tags: added: patch
Revision history for this message
Scott Moser (smoser) wrote :

I'm guessing that the issue here is that tools use hostname(7) to get the hostname on the system and then are confused / broken when that is more than 64 chars.

It really seems like its more important to have consitent behavior across the board then change behavior somewhat randomly.

Revision history for this message
Scott Moser (smoser) wrote :

fix-committed in revno 1049.

Changed in cloud-init:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.7~bzr1055-0ubuntu1

---------------
cloud-init (0.7.7~bzr1055-0ubuntu1) vivid; urgency=medium

  * New upstream snapshot.
    * move to python3 (LP: #1247132)
    * systemd: run cloud-init before systemd-user-sessions.service
    * Use the GCE short hostname. (LP: #1383794)
    * Enable user-data encoding support for GCE. (LP: #1404311)
    * Update to use a newer and better OMNIBUS_URL
    * Be more tolerant of 'ssh_authorized_keys' types
    * Fix parse_ssh_config failing in ssh_util.py
    * Increase the robustness/configurability of the chef module.
    * retain trailing newline from template files when using
      jinja2 (LP: #1355343)
    * fix broken output handling (LP: #1387340)
    * digital ocean datasource
    * update url in config drive documentation
    * freebsd: enable correct behavior on Ec2.
    * freebsd: Use the proper virtio FreeBSD network interface name.
 -- Scott Moser <email address hidden> Wed, 11 Feb 2015 15:55:58 -0500

Changed in cloud-init (Ubuntu):
status: New → Fix Released
Scott Moser (smoser)
Changed in cloud-init (Ubuntu Precise):
status: New → Confirmed
Changed in cloud-init (Ubuntu Trusty):
status: New → Confirmed
Changed in cloud-init (Ubuntu Utopic):
status: New → Confirmed
Changed in cloud-init (Ubuntu Precise):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Trusty):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Utopic):
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Ben, or anyone else affected,

Accepted cloud-init into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.6~bzr1022-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Utopic):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Ben, or anyone else affected,

Accepted cloud-init into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.5-0ubuntu1.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Trusty):
status: Confirmed → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Ben, or anyone else affected,

Accepted cloud-init into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.6.3-0ubuntu1.16 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Precise):
status: Confirmed → Fix Committed
Changed in cloud-init (Ubuntu Precise):
assignee: nobody → Ben Howard (utlemming)
Changed in cloud-init (Ubuntu Trusty):
assignee: nobody → Ben Howard (utlemming)
Changed in cloud-init (Ubuntu Utopic):
assignee: nobody → Ben Howard (utlemming)
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Confirmed -proposed package.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.6~bzr1022-0ubuntu2

---------------
cloud-init (0.7.6~bzr1022-0ubuntu2) utopic; urgency=medium

  [ Ben Howard ]
  * d/patches/lp-1383794-gce-short_name.patch: Use short hostname for GCE
    (LP: #1383794).

  [ Wayne Witzel III ]
  * d/patches/lp-1404311-gce-data_encoding.patch: Enable user-data encoding
    support for GCE (LP: #1404311).

  [ Daniel Watkins ]
  * d/patches/lp-1422919-azure-g5_ephemeral.patch: Properly format G5 series
    cloud instances (LP: #1422919).
 -- Ben Howard <email address hidden> Tue, 17 Feb 2015 15:15:33 -0700

Changed in cloud-init (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.4

---------------
cloud-init (0.7.5-0ubuntu1.4) trusty; urgency=medium

  [ Ben Howard ]
  * d/patches/lp-1383794-gce-short_name.patch: Use short hostname for GCE
    (LP: #1383794).

  [ Wayne Witzel III ]
  * d/patches/lp-1404311-gce-data_encoding.patch: Enable user-data encoding
    support for GCE (LP: #1404311).

  [ Daniel Watkins ]
  * d/patches/lp-1422919-azure-g5_ephemeral.patch: Properly format G5 series
    cloud instances (LP: #1422919).
 -- Ben Howard <email address hidden> Tue, 17 Feb 2015 14:56:16 -0700

Changed in cloud-init (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.16

---------------
cloud-init (0.6.3-0ubuntu1.16) precise-proposed; urgency=medium

   [ Ben Howard ]
   * debian/patches/lp-1383794-gce-short_name.patch: Use short hostname for GCE
     (LP: #1383794).

   [ Wayne Witzel III ]
   * debian/patches/lp-1404311-gce-data_encoding.patch: Enable user-data
     encoding support for GCE (LP: #1404311).
 -- Ben Howard <email address hidden> Tue, 21 Oct 2014 14:56:23 -0600

Changed in cloud-init (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

This is fixed in cloud-init 0.7.7.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.