Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with ConfigDriveV2 and ssh authorized_keys #2320

Closed
ubuntu-server-builder opened this issue May 9, 2023 · 9 comments
Closed

Issue with ConfigDriveV2 and ssh authorized_keys #2320

ubuntu-server-builder opened this issue May 9, 2023 · 9 comments
Labels
launchpad Migrated from Launchpad priority Fix soon

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1077700

Launchpad details
affected_projects = ['cloud-init (Ubuntu)', 'cloud-init (Ubuntu Quantal)', 'cloud-init (Ubuntu Raring)']
assignee = smoser
assignee_name = Scott Moser
date_closed = 2012-11-14T20:30:24.515630+00:00
date_created = 2012-11-11T20:03:57.926050+00:00
date_fix_committed = 2012-11-12T17:36:49.085696+00:00
date_fix_released = 2012-11-14T20:30:24.515630+00:00
id = 1077700
importance = high
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1077700
milestone = None
owner = alexpilotti
owner_name = Alessandro Pilotti
private = False
status = fix_released
submitter = alexpilotti
submitter_name = Alessandro Pilotti
tags = ['cloudinit', 'configdrive', 'hyperv', 'patch', 'verification-done']
duplicates = []

Launchpad user Alessandro Pilotti(alexpilotti) wrote on 2012-11-11T20:03:57.926050+00:00

== SRU Information ==
[Impact]

  • Users of openstack who use config-drive version 2 (added in folsom/quantal) will not have their ssh keys imported from the config drive. They can use other means (ssh-import-id) to get ssh keys imported, but users would expect instances launched with a given key to have access to the instance with that key.
  • without this fix images don't work as expected with OpenStack folsom and confdig-drive-v2.
  • The bug was simply that the cloud-init key was expecting a key named 'public-keys' and openstack named it 'public_keys'

[Test Case]

  • launch cloud-image instance on openstack folsom or grizzly with config-drive enabled passing, and pass in a ssh key (nova boot --key_name).
  • attempt to ssh in as 'ubuntu@' and see failure.

[Regression Potential]

  • low chance for regression. fix is tested in raring. Potential for regression would really be in a patched OpenStack.

== End SRU Information ==

cloud-init (latest sources) is not getting the public key from config drive. Tested on an Ubuntu 12.04 instance.

A patch is attached.

Here's the content of the configdrive generated by Nova:

https://dl.dropbox.com/u/9060190/configdrive.tar.gz

@ubuntu-server-builder ubuntu-server-builder added launchpad Migrated from Launchpad priority Fix soon labels May 9, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Alessandro Pilotti(alexpilotti) wrote on 2012-11-11T20:03:57.926050+00:00

Launchpad attachments: cloudinit_pk_patch.txt

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2012-11-12T02:43:29.012498+00:00

Thanks for raising this.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Ubuntu Foundations Team Bug Bot(crichton) wrote on 2012-11-12T04:17:12.111479+00:00

The attachment "cloudinit_pk_patch.txt" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2012-11-12T17:36:47.188285+00:00

fixed in trunk at revno 718.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Launchpad Janitor(janitor) wrote on 2012-11-14T21:11:11.344701+00:00

This bug was fixed in the package cloud-init - 0.7.1-0ubuntu1


cloud-init (0.7.1-0ubuntu1) raring; urgency=low

  • New upstream release.
    • landscape: install landscape-client package if not installed.
      only take action if cloud-config is present (LP: #1066115)
    • landscape: restart landscape after install or config (LP: #1070345)
    • multipart/archive: do not fail on unknown headers in multipart
      mime or cloud-archive config (LP: #1065116).
    • tools/Z99-cloud-locale-test.sh: avoid warning when user's shell is
      zsh (LP: #1073077)
    • fix stack trace when unknown user-data input had unicode (LP: #1075756)
    • split 'apt-update-upgrade' config module into 'apt-configure' and
      'package-update-upgrade-install'. The 'package-update-upgrade-install'
      will be a cross distro module.
    • fix bug where cloud-config from user-data could not affect system_info
      settings (LP: #1076811)
    • add yum_add_repo configuration module for adding additional yum repos
    • fix public key importing with config-drive-v2 datasource (LP: #1077700)
    • handle renaming and fixing up of marker names (LP: #1075980)
      this relieves that burden from the distro/packaging.
    • group config: fix how group members weren't being translated correctly
      when the group: [member, member...] format was used (LP: #1077245)
    • work around an issue with boto > 0.6.0 that lazy loaded the return from
      get_instance_metadata(). This resulted in failure for cloud-init to
      install ssh keys. (LP: #1068801)
    • add power_state_change config module for shutting down stystem after
      cloud-init finishes. (LP: #1064665)
      -- Scott Moser smoser@ubuntu.com Wed, 14 Nov 2012 15:18:50 -0500

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Clint Byrum(clint-fewbar) wrote on 2012-12-13T20:30:51.108717+00:00

Hello Alessandro, or anyone else affected,

Accepted cloud-init into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cloud-init/0.7.0-0ubuntu2.1 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!

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Clint Byrum(clint-fewbar) wrote on 2013-01-08T19:07:21.562849+00:00

Hello Alessandro, or anyone else affected,

Accepted cloud-init into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cloud-init/0.7.0-0ubuntu2.2 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!

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Colin Watson(cjwatson) wrote on 2013-01-16T14:21:02.738829+00:00

The verification of this Stable Release Update 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 regresssions.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Launchpad Janitor(janitor) wrote on 2013-01-16T14:21:09.774131+00:00

This bug was fixed in the package cloud-init - 0.7.0-0ubuntu2.2


cloud-init (0.7.0-0ubuntu2.2) quantal-proposed; urgency=low

  • debian/patches/lp-1090482-fix-cloud-config-mirrors.patch:
    fix issue with cloud-config data in user-data providing mirror
    info (LP: #1073077)

cloud-init (0.7.0-0ubuntu2.1) quantal-proposed; urgency=low

  • debian/patches/lp-1073077-zsh-workaround-for-locale_warn.patch: avoid
    warning when user's shell is zsh (LP: #1073077)
  • debian/patches/lp-1077700-config-drive-fix-ssh-authorized-keys.patch:
    fix bug in config-drive-v2 usage of authoried keys (LP: #1077700)
  • debian/patches/lp-1080985-fix-resize-root-noblock.patch:
    fix 'resize_root: noblock' (LP: #1080985)
  • debian/patches/lp-1076811-fix-userdata-update-to-distro-config.patch:
    fix updates to distro config via user-data. (LP: #1076811)
  • debian/patches/lp-1066115-install-landscape-if-needed.patch:
    fix permissions on landscape config, and ensure landscape client
    is installed if landscape config is given. (LP: #1066115)
  • debian/patches/lp-1070345-restart-landscape-if-needed.patch:
    restart the landscape-client if changes to config were made. (LP: #1070345)
  • debian/patches/lp-1077020-fix-ca-certificates-blanklines.patch: fix
    adding of empty lines in ca-certificates file (LP: #1077020)
    -- Scott Moser smoser@ubuntu.com Mon, 17 Dec 2012 10:15:03 -0500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad priority Fix soon
Projects
None yet
Development

No branches or pull requests

1 participant