p3lim | hi, trying to set up a common autoinstall cloud-init user-data for all machines, which means we want to set the hostname for each machine somewhere else; meta-data is ignored, `ds=nocloud-net;h=` is ignored, the hostname we send from our DHCP server is ignored, how can I set the hostname of a machine _without_ doing it in user-data? | 11:43 |
---|---|---|
rbasak | p3lim: I think normally it's done from meta-data. Maybe figure out why it's being ignored for you? | 11:46 |
rbasak | Take for example any regular official Ubuntu image. The hostname does get set, even when userdata only contains an ssh key. | 11:47 |
p3lim | `ds=nocloud-net;h=` is the equivalent to setting hostname in meta-data, right? | 11:48 |
p3lim | I have tried both and both are getting ignored, with the 22.04 live-server ISO | 11:48 |
p3lim | full kernel line: /casper/vmlinuz autoinstall ds=nocloud-net\;s=http://.../ubuntu/\;h=ubuntu-test-vm --- | 11:50 |
rbasak | I've never used that mechanism, sorry. | 11:50 |
rbasak | I suspect that's the bit you need to focus on though. | 11:51 |
rbasak | Maybe that setting isn't getting through to cloud-init for whatever reason. | 11:51 |
utkarsh2102 | rbasak: hey, are you working today? | 11:52 |
rbasak | Yes | 11:56 |
rbasak | p3lim: wait. Why are the semicolons backslash-escaped? | 11:56 |
rbasak | p3lim: and if you're setting s=, why do you need h=? | 11:57 |
p3lim | semicolons because I set this in the ISO's grub menu, I need to escape the backslashes there | 11:58 |
p3lim | and I'm setting h= because meta-data is not being used, trying everything now to set the hostname outside of user-data | 11:58 |
rbasak | The code is here: https://github.com/canonical/cloud-init/blob/5bdc217b431b9cb5eedf9fd7372be733ba36ec25/cloudinit/sources/DataSourceNoCloud.py#L294 | 12:06 |
p3lim | I'm not questioning the cloud-init code, I'm sure it works fine | 12:08 |
p3lim | but I am questioning how subiquity is using it, because no matter what I do it's not getting used | 12:09 |
rbasak | Ah you didn't mention subiquity. | 12:11 |
rbasak | I'm not sure how it interacts with what you're trying to do. | 12:12 |
p3lim | well I'm using the 22.04 ISO with autoinstall, so subiquity is implied, there's no way around subiquity right? | 12:12 |
p3lim | trying to set the hostname using `early-commands: ['hostname test']`, but this also doesn't do anything, the machine still ends up with localhost as its hostname | 13:19 |
=== oerheks1 is now known as oerheks |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!