=== cpaelzer__ is now known as cpaelzer | ||
minimal | could someone review PR 626 please? | 13:54 |
---|---|---|
meena | minimal: well,uhm. yeah, not much i can do today | 14:55 |
smoser | minimal: well i helpfully made a bikeshed whitespace comment :-( | 14:58 |
smoser | the thing generally looks fine to me... in that your tests are present, but i didnt do a thoughtful review | 14:58 |
* meena is all over the place… since… at least a few… months? | 15:01 | |
staples | Hi all, I am struggling with running cloud-init for custom-built AMI (Ubuntu 18.04 based) in AWS ec2 user data section. Essentially, it appears that cloud_final_modules (scripts_user and write_files) is not triggering. | 15:05 |
staples | Content-Type: multipart/mixed; boundary="//"MIME-Version: 1.0--//Content-Type: text/cloud-config; charset="us-ascii"MIME-Version: 1.0Content-Transfer-Encoding: 7bitContent-Disposition: attachment; filename="cloud-config.txt"#cloud-configcloud_final_modules:- [scripts_user, always]- [write_files, always]apt_update: trueapt_upgrade: truepackages: - | 15:05 |
staples | openssh-serverwrite_files: | 15:05 |
staples | this is my script. Can anyone help me here? | 15:06 |
staples | I also tried with bash script with no luck. It seems to me that user data never executes on the machine. | 15:07 |
paride | https://github.com/canonical/cloud-utils/pull/19 changelog update for cloud-utils 0.32 (from `git log | log2dch, as I think the previous entries were generated) | 15:08 |
paride | Odd_Bloke, smoser ^^ | 15:08 |
staples | I suspect that it does not do it because it is custom AMI and because original /etc/cloud/cloud.cfg does not have these modules that I try to run with user data. Unfortunately, there is no option to rebake the image | 15:10 |
minimal | paride: As you're here, any chance of a cloud-utils release soon? The last one was a long time ago and since then growpart has added LVM support which is something useful for cloud-init. | 15:11 |
paride | minimal, that's exactly what that PR is for :) | 15:11 |
minimal | paride: a cool, I'd mentioned it to Odd_Bloke last week so he'd said he'd ask about. Thanks! | 15:12 |
paride | minimal, yep we decided to cut a new release after your ping about it | 15:13 |
minimal | cool. I'm the cloud-utils (and cloud-init) maintainer for Alpine Linux so I'll be ready to package it up as soon as its out ;-) | 15:14 |
AscII | I signed the CLA on LP when I added the Hetzner Cloud DS. Is this sufficient for https://github.com/canonical/cloud-init/pull/629 ? | 15:20 |
AscII | Proof via https://code.launchpad.net/~lp-markusschade/cloud-init/+git/cloud-init/+ref/migrate-lp-to-github | 15:21 |
AscII | I have seen that smoser has moved dmi functions out of util | 15:22 |
AscII | So I guess depending on when it is merge I would have to rebase https://github.com/canonical/cloud-init/pull/630 | 15:22 |
meena | every damn time i update a bug on Launchpad and get an email about it, i'm like: OH! SOMEONE UPDATED MY BUG?! | 15:25 |
paride | meena, I think you can disable that. https://launchpad.net/~minagalic/+edit should have a "Send me bug notifications for changes I make" setting | 16:47 |
Hawk_X | Hello to all! I guess it is a recurrent question. I couldn't find an answer on the FAQ. What would be the best reference documentation on how to use "locally" user-data? | 18:21 |
Hawk_X | I want to autoconfigure with cloud-init a KVM VM ran locally with the CDROM ISO mechanism and the documentation is not clear... | 18:22 |
Hawk_X | On if it is the same as running the user-data file from the ISO or directly on a cloud instance. | 18:22 |
Hawk_X | Of course this is a rookie question, hopefully it doesn't have a not too obvious answer... | 18:23 |
Hawk_X | Thanks for any answer! :-) | 18:26 |
rharper | Hawk_X: user-data should behave the same whether it comes from cdrom NoCloud datasource, or if the user-data comes from EC2's meta-data service; I *think* that was what you were asking; | 18:29 |
Odd_Bloke | rharper: I've updated https://github.com/canonical/cloud-init/pull/609/ with a fresh approach (and some tests), FYI. | 18:35 |
rharper | ok | 18:35 |
Odd_Bloke | blackboxsw: falcojr: ^ is the update I mentioned was coming in stand-up. | 18:36 |
Hawk_X | You are right rharper Thanks! | 18:39 |
Hawk_X | Now the next obvious question is, what is the best repository of examples for documentation on cloud init for ubuntu 20 instance? | 18:40 |
Hawk_X | I know, it is obvious for many people but I really can't find how to set an static IP on user-data, from what I read it is part of meta-data but I can't get it to work with the ISO file. | 18:40 |
Hawk_X | And also, from the website: https://cloudinit.readthedocs.io/en/latest/topics/examples.html it appears that the option to use pwauth over SSH is now gone. | 18:41 |
Hawk_X | I have a user-data file that I ran on Ubuntu 16.04 that did work with ssh pw auth that is not working now on Ubuntu 20.04 Instance... | 18:42 |
rharper | Hawk_X: you cannot supply network-config via user-data as network config must be applied before cloud-init fetches user-data; some datasources, like NoCloud or ConfigDrive can accept network-config separately from user-data; on clouds, network-config typically comes from the instance metadata service | 18:43 |
Hawk_X | yes, so I can't supply network-config from the meta-data file over an ISO file. | 18:45 |
rharper | Hawk_X: re: ssh pwauth, not clear what you mean; do you have a user-data file with the example config that's not working? I routinely launch with: #cloud-config\npassword: <some passwd>\nchpasswd: { expire: False}\nssh_pwauth: True; and I can ssh in and enter a password (though typically I import an ssh public key | 18:45 |
rharper | Hawk_X: in network-config, not meta-data | 18:45 |
Hawk_X | And I can't supply network-config over the ISO or can I? | 18:45 |
rharper | you can, depends on your Datasource | 18:45 |
Hawk_X | I couldn't find any doc that tells me that is supported. | 18:46 |
rharper | the NoCloud datasource, reads meta-data, user-data, network-config files; the ConfigDrive datasource has a different directory structure, it reads a network-config file (which is in ifupdown format) and a network-data.json format (which is what openstack metadata service provides) | 18:46 |
Hawk_X | I hope and not saying something stupid but it is a nocluod environment running on KVM in ubuntu 20.04 | 18:46 |
rharper | https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html | 18:47 |
rharper | Network configuration can also be provided to cloud-init in either Networking Config Version 1 or Networking Config Version 2 by providing that yaml formatted data in a file named network-config. If found, this file will override a network-interfaces file. | 18:47 |
rharper | that could use some re-wording to make it more obvious | 18:48 |
Hawk_X | Nice. rharper that last part is what I needed to read | 18:48 |
Hawk_X | Yes, it isn't quite clear. Let me give it a go as I have the environment ready. | 18:48 |
Hawk_X | REgarding the ssh_pwauth I will try the file you've wrote as I want to create a customer user. | 18:49 |
Hawk_X | And user pwauth for it and for the love of me it doesn't works... | 18:49 |
Hawk_X | This is what I am using: | 18:49 |
rharper | https://paste.ubuntu.com/ | 18:50 |
rharper | Hawk_X: ^ if you want to share user-data; | 18:50 |
Hawk_X | Thanks rharper | 18:51 |
Hawk_X | https://paste.ubuntu.com/p/BXSn5WxJnD/ | 18:51 |
Hawk_X | I install the vm with virt-install and connect using SSH and the password is not accepted. The ssh key does. | 18:53 |
Hawk_X | I looked at the /var/log/cloud-init.log file and I searched for "ssh_pwauth" and nothing match | 18:54 |
rharper | I don't see anything wrong with that; does the log show any other errors? | 19:01 |
rharper | Hawk_X: look for: 2020-10-27 19:01:09,324 - ssh_util.py[DEBUG]: line 58: option PasswordAuthentication updated no -> yes | 19:01 |
rharper | 19:01 | |
rharper | now for your user login, look for cloudinit.config.cc_users_groups in the log, should see what it's doing , like Running hidden command to protect sensitive input/output logstring: ['useradd', 'rharper', '--shell', '/bin/bash', '-m'] | 19:02 |
Hawk_X | That I can look for. I am spinning up the instance | 19:02 |
Hawk_X | Much appreciated! | 19:08 |
Hawk_X | rharper, it says "yes" | 19:22 |
rharper | cool, so ssh pwauth worked (it changes sshd config to allow password login over ssh) | 19:26 |
rharper | so your remaining issue is your new user and the password; I suggest importing an ssh key for the default user; and then login as the default user to help debug the secondary user | 19:27 |
meena | paride: but then nobody will mail me :P | 19:37 |
Hawk_X | Yes, but for some reason the network-config file config is not being accepted by cloudinit | 19:57 |
Hawk_X | So the interface is brought up but not configured. | 19:57 |
Hawk_X | I am looking at the logs now. | 19:57 |
Hawk_X | Still looking... | 20:10 |
rharper | Hawk_X: you can paste me your network-config file from the nocloud iso; the cloud-init log file is usually pretty verbose about network config it applies and writes; | 20:18 |
meena | smoser: i made the executive decision to resolve this comment: https://github.com/canonical/cloud-init/pull/625#discussion_r512296035 | 20:46 |
smoser | what does resolve mean in that scenario? | 21:00 |
meena | smoser: i clicked the resolve conversation button, after explaining that Puppet Facter also calls jails `jail` and not `bsd-jail` | 21:01 |
smoser | oh. i see. | 21:02 |
meena | i could look at chef and salt and ansible for other clues | 21:02 |
smoser | never mind. | 21:02 |
smoser | thats fine. | 21:02 |
Odd_Bloke | AnhVoMSFT: Would you be able to take a look at https://bugs.launchpad.net/cloud-init/+bug/1901011? It relates to new Azure instance types that seem to be causing some issues with the Azure DS. | 21:05 |
ubot5 | Ubuntu bug 1901011 in cloud-init "Azure temporary disk not present for instance type" [Undecided,New] | 21:05 |
Hawk_X | Thanks to rharper for the assist. | 21:46 |
Hawk_X | Unfortunately, the network-config is not being accepted by ubuntu. Here's the pastebin: https://paste.ubuntu.com/p/b6F2j8xhpH/ | 21:46 |
Hawk_X | I tried with the match and no match option for the MAC. Which it doesn't make sense to me as I do not know the MAC address to match it... | 21:46 |
Hawk_X | Either way, it doesn't recognize the network config and the instance boots without IP :-( | 21:47 |
Hawk_X | The cloud-init.log complains about some parameters but as I can't put an IP on the instance I can't paste the exact error here. | 21:48 |
meena | eh? | 21:49 |
meena | you have no (virtual) serial console access to the machine? | 21:50 |
meena | Hawk_X: worst case, you could post a screenshot | 21:51 |
rharper | Hawk_X: your nameservers is incorrect format, it's namesevers: addresses: [1.1.1.1] | 22:03 |
Hawk_X | Thanks! | 22:18 |
Hawk_X | I have virtual console access | 22:18 |
Hawk_X | Apologies, I thought I would be receiving an answer soon. Much appreciated. | 22:36 |
Hawk_X | Spinning a new instance now. BRB | 22:36 |
Hawk_X | Ladies and Gentlemen unfortunately, the day caught up with me. I didn't have the time to spin the other instance. I will try to do it later tonight or tomorrow morning | 23:17 |
Hawk_X | Thanks again for all your assistance! | 23:17 |
johnsonshi | Odd_Bloke: I'm taking a look at https://bugs.launchpad.net/cloud-init/+bug/1901011 now | 23:22 |
ubot5 | Ubuntu bug 1901011 in cloud-init "Azure temporary disk not present for instance type" [Undecided,New] | 23:22 |
johnsonshi | Yes indeed, there are new instance types that don't have ephemeral resource disks. We're discussing internally about this issue. | 23:24 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!