/srv/irclogs.ubuntu.com/2017/10/27/#cloud-init.txt

* smoser summons the all knowing python hero00:22
smoserpip install --pre bzr-fastimport==0.11.0.final.000:22
smoserCollecting bzr-fastimport==0.11.0.final.000:22
smoser  Could not find a version that satisfies the requirement bzr-fastimport==0.11.0.final.0 (from versions: )00:22
smoserNo matching distribution found for bzr-fastimport==0.11.0.final.000:22
smoseryet ...00:22
smoserhttps://pypi.python.org/pypi/bzr-fastimport00:22
smoserso what vifes ?00:22
smosergives even00:25
smoserseems taht there is only a pip record, no data00:28
naccsmoser: yeah, usually the pypi page has more info00:29
smoserthe url there is bad, 40400:29
naccsmoser: ah that could cause it to fail to fetch, maybe00:30
smoserblackboxsw: http://paste.ubuntu.com/25831034/15:54
* powersj is running a full nocloud-kvm run on his branch after changing /tmp to /var/tmp and then will push17:23
=== ahasenack is now known as andreas
powersjblackboxsw: https://paste.ubuntu.com/25831640/17:55
powersjblackboxsw: am I missing a commit? I rebased on master and ran into those?17:57
blackboxswpowersj: yeah that should be fixed to be a debug msg18:08
powersjblackboxsw: should be fixed as in, already in master?18:09
blackboxswyeah18:09
blackboxswchecking rev18:09
blackboxsw41152f10ddbd8681cdac44b408038a4f23ab02df powersj18:10
blackboxswoct 17th18:10
blackboxswstale pyc files in your tree?18:10
powersjsmoser: "With regard to "not logged in as root by default", that is kind of wrong."18:17
powersjonly lxd and digital-ocean use a root user as default, aws, gce, azure, kvm cloud-images else assumes some sort of generic user, whether that is ubuntu or otherwise18:17
powersjhelp me understand what you are looking for with that comment18:18
powersjblackboxsw: ... realized what I was doing wrong... not using in tree cloud-init, so cloud image has old version of cloud-init18:23
powersjsigh my bad18:23
SargunDo I have to do anything to get cloud-init to nudge netplan to reload19:28
smoserSargun: what have youd one that made you think netplan needed nudging ?19:34
blackboxswI thought "it just worked"™    cloud-init calls "netplan generate" to put appropriate configs in the right place at the right time.19:35
rharperthere is at least one bug where netplan bug related19:37
rharperhttps://bugs.launchpad.net/ubuntu/+source/nplan/+bug/166956419:37
ubot5Ubuntu bug 1669564 in nplan (Ubuntu Artful) "udevadm trigger subsystem-match=net doesn't always run rules because of reconfiguration rate-limiting" [Undecided,Triaged]19:37
Sargunsmoser: Using the following cloudinit: https://gist.github.com/sargun/7152cac024896cb73152fc35bef2fb1720:38
Sargunusing ec2 user metadata20:38
SargunOn Ubuntu 17.0420:39
smoserSargun: yu're hoping to get ipv6 dhcp ?20:39
smoseryou'd have to put that network config inside the image20:40
smoseryou can't feed it in from user-data20:40
smoserthat it reads over the network20:40
smoserthat said, 17.10 should get you wahat you want there.20:40
SargunWell, I was hoping it'd read it, and realize that it needs to restart.20:40
Sargun17.10 AMI?20:40
SargunDoes 17.10 automatically do dhcp6?20:42
smoserSargun: at this point that doesnt work.20:47
smoserbut on 17.10 it should correclty notice that you have ipv6 enabled20:47
smoserand will then do the right thing20:47
smoserand that is actually in process of sru to 17.04 also20:48
SargunTried 17.1020:49
SargunIt only configured V6 and didn't do v420:49
SargunI need dual-stack20:49
smoserSargun: hm.20:50
smoserit should definitely do v420:50
smosercan you give more details on taht ?20:50
smoserin 17.1020:50
smoserblackboxsw: ^20:50
Sargunsmoser: Just used the some cloud-init.20:51
Sargunhttps://gist.github.com/sargun/3bda5690c7bf573a47e5ab8e16d1442520:51
rharperurg20:52
rharperneeds a dhcp4: true in there too20:53
blackboxswso Sargun you are trying to get dual stack up ipv4/6 on an ec2 instance. The provided network-config makes sense as it should be passed through in cloud-init direct to netplan config20:53
blackboxswthe first paste was it right20:53
Sargunrharper: That's what I'm putting into user-data.20:53
Sargunmy expectation is that the cloud-init file in /etc will be written out with dhcp4 and dhcp6.20:53
rharperwe can't pass network config as user-data; it's too late as smoser said20:54
rharperSargun: it should; but need to check the cloud-init code20:54
smoseryou cna't do it in user-ata.20:54
SargunHrm.20:54
rharperit's going to read EC2 metadata to see what network config looks like20:54
SargunIs there any other mechanism?20:54
smoserbut it should do the right thing.20:54
rharperit should see that you enabled dhcp6 , but it should also enable dhcp420:54
SargunYeah20:54
blackboxswdpkg -l cloud-init on that image to see what rev you have on that instance20:55
Sargunii  cloud-init                                            17.1-18-gd4f70470-0ubuntu1      all                             Init scripts for cloud instances20:55
blackboxswthx20:55
rharperif nic_metadata.get('public-ipv4s'):20:55
rharper            nic_cfg['subnets'].append({'type': 'dhcp4'})20:55
blackboxswright it shoulce to that for both ipv4 and ipv620:55
SargunI don't have any public-ipv4s20:55
Sargunit should check for both private & public ipv4.20:56
Sargunif nic_metadata.get('public-ipv4s') or nic_metadata.get('private-ipv4s'):...20:56
rharpernetwork/interfaces/macs/mac/local-ipv4s20:57
rharperblackboxsw: ^20:57
rharperthat's the metadata path to private v420:57
blackboxswcould be, was just checking http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html20:58
Sargunyeah20:58
Sargunyou have both public and private IPv4s on the metadata service20:58
rharperbut you explicitly don't have a public-v4 enabled ?20:58
Sargunyeah20:59
rharpergotcha20:59
blackboxswright agreed, I think we probably need to add the internal/local ipv4 check too.20:59
rharperit's normally enabled by default IIUC20:59
Sargunthat'sthe default for a private subnet on VPC wizzard.20:59
rharperinteresting20:59
SargunEC2 is weird.20:59
blackboxswI thought all aws instances had to have public ipv4 addrs.20:59
blackboxswwow20:59
Sargunblackboxsw: not VPC21:00
rharperlooks like ubuntu-bug time21:01
blackboxswyeah sargun for giggles can you ubuntu-bug cloud-init   and follow the prompts to submit a bug on the terminal CLI?21:02
blackboxswSargun: rather ^21:02
blackboxswI'll add the check there on local-ipv4 too today and put something up for review/landing so Ec2 can be 'fixed' for dual stack internal ipv4 as well21:02
blackboxswso I meant to say: "Can your run 'ubuntu-bug cloud-init'   and follow the prompts from your instance"21:03
SargunTrying21:03
blackboxswthx21:03
SargunI can't from that instance, because it turns out to need IPv4.21:04
Sargunoh21:04
Sargunwait.21:04
SargunCan I just file it from launchpad.net?21:05
smoserSargun: you can.21:06
blackboxswfor sure21:06
smoserplease do run 'cloud-init collect'21:07
smoserand attach that.21:07
smoserbut yeah, you're already provided a good amount of information.21:07
smoserthanks.21:07
blackboxswhttps://bugs.launchpad.net/cloud-init/+filebug :)21:07
Sargun/usr/bin/cloud-init: error: argument subcommand: invalid choice: 'collect' (choose from 'init', 'modules', 'single', 'dhclient-hook', 'features', 'analyze', 'devel', 'collect-logs')21:08
SargunAre you sure?21:08
blackboxswcollect-logs21:10
blackboxswinstead of collect21:10
blackboxswit should dump a tarfile in your local directory21:11
blackboxswthat can be attached to the bug21:11
Sargunhttps://bugs.launchpad.net/cloud-init/+bug/172815221:11
ubot5Ubuntu bug 1728152 in cloud-init "IPv4 and IPv6 Dual Stack Does Not work when instance is not assigned public IPv4 address" [Undecided,New]21:11
blackboxswsuperb thanks Sargun21:12
Sargunyou can't actually single-stack (IPv6 only) on ec221:12
Sargunyou always get an IPv4 IP21:12
blackboxswyeah I was under mistaken impression that the ipv4 IP also had to be public21:12
blackboxswbecause of the defaults in vpc21:12
blackboxswwill reproduce a faliure on my vpc account and confirm I can see it too and we'll have something. (it's a quick fix to cloud-init)21:13
Sargunyeah21:13
SargunI wonder if I can give this instance a public-ipv4 IP.21:14
blackboxswif you can re-associate ipv4 public, you could sudo rm -rf /var/lib/cloud /var/log/cloud-init.*; sudo reboot and cloud-init could come back up w/ the newly rendered network config21:15
blackboxswbut minimally Sargun I'm expecting this should work for you...21:18
blackboxswhttp://paste.ubuntu.com/25832582/21:18
blackboxswsave it on the instance to /tmp/patch1  then cd /usr/lib/python3/dist-packages/cloudinit/sources/; sudo patch -p3 < /tmp/patch1; sudo rm -rf /var/lib/cloud  /var/log/cloud-init*; sudo reboot21:19
blackboxswI believe that should render dhcp4 properly21:20
blackboxswas it'll see your local-ipv4s in metadata21:20
SargunAny idea why my apt source isn't working21:25
blackboxswSargun: you need apt:\n  sources:\n <yoursourcename>:21:29
blackboxswhrm....21:31
Sargunah21:31
blackboxswSargun: yeah it's admitedly a really long example described at https://cloudinit.readthedocs.io/en/latest/topics/modules.html#apt-configure21:34
blackboxswit has quite a few options for cloud-config21:34
smoserrharper: suck.21:35
smoserso if i take a stock artful image21:35
smoserthen21:36
smoserqemu-img create -f qcow2 -b artful-cloud-image.img my.img && sudo mount-image-callback my.img -- mchroot touch /etc/cloud/cloud-init.disabled21:36
smoserit hangs on boot.21:36
smosernot sure what is hanging.21:36
smoserends with a very unhelipful systemd21:37
smoser[  OK  ] Started Snappy daemon.21:37
smoser[  OK  ] Started LXD - container startup/shutdown.21:37
smoser[  *** ] A start job is running for Wait for…e Configured (1min 19s / no limit)21:37
blackboxswsmoser: is that what cyphermox hit?21:37
SargunMaybe I'll patch in JSON support into cloud-init.21:37
Sargunand write json-schema for this21:37
rharperyou can turn on systemd debugging via cmdline21:37
smoserblackboxsw: i dont think so. but in debugging his and trying different things i found it.21:37
rharpersystemd.log_level=debug systemd.log_target=console21:38
rharperpassed as params21:38
rharpersmoser: I wonder if there's no default network config in the iamge ?21:40
rharperso if you don't run cloud-init you don't get a network config ? but you booted with an interface ?21:40
rharpercan do drop your -net user ?21:40
rharperno nic, no wait ?21:40
smoserrharper: http://paste.ubuntu.com/25832717/21:42
smoserit doesnt help much21:43
smoseri had used debug on systemd before.21:43
smosertheres all the noise21:43
smoser[***] A start job is running blahblahblah ...<removed important part in ...> more blahblahblah21:43
smoserohw ell.21:44
smosersuck21:44
smoserlater.21:44
smoseri have to run.21:44
rharperI think the .mounts for cloud migth cause issue21:45
blackboxswok smoser rharper Sargun just put up a trivial branch on this https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/33295421:49
blackboxswI'm going to try testing it now21:49
* blackboxsw needs to find that default checkbox for internal only ipv421:50
blackboxswwell smoser now I get to write an SRU-verification test for this bug too using the script that I'm halfway done w/ launch-ec2 :)21:56
blackboxswanyway you guys should be leaving, it's EOW time21:56
smoserrharper: http://paste.ubuntu.com/25832788/22:01
smoser"no limit" finally gave up22:02
smosersystemd-networkd-wait-online.service22:02
smoserfun22:02
rharperlol22:02
rharperI knew it22:02
rharperit's configured to wait until at least *one* interface is up22:03
rharperwe gave it none22:03
rharperor we'll have one, but no config22:03
smoserireally have to be gone22:03
smoserwell, cloud-init iddnt run22:03
rharperthere may need to be a "baked" in netplan yaml for dhcp on en*22:03
smoserso it didnt give it anyting22:03
rharperright22:03
smoserand there wasnt any nick there.22:03
rharperbut the old networking service asked if there were network devices to be configured22:03
smosereither way, it should have decided "nothing to do"22:03
rharpernetworkd-wait-online says, wait until I have networking22:03
rharperwhich will never happen22:03
smosercould you file a bug against cloud-images ?22:03
rharperI think there is one, but if not I will22:04
smoseryeah. which is wrong.22:04
rharperI know22:04
rharperI argued with slangasek about it before22:04
rharpersmoser: https://bugs.launchpad.net/cloud-images/+bug/172816422:12
ubot5Ubuntu bug 1728164 in cloud-images "artful images hang when cloud-init is disabled due to no network config" [Undecided,New]22:12
blackboxswhere's where I got that ipv4 required "You cannot disable IPv4 support for your VPC and subnets; this is the default IP addressing system for Amazon VPC and Amazon EC2."   per http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-migrate-ipv6.html22:32
blackboxswI interpreted that a public-ipv4 required... bummer22:32
blackboxswmeh our chef example is also bogus as far as apt configuration is concerned https://cloudinit.readthedocs.io/en/latest/topics/examples.html#install-and-run-chef-recipes22:34
blackboxswI'll fix that when  I touch bug: #172787622:35
ubot5bug 1727876 in cloud-init "Document in RTD that cloud-init users shouldn't write to /tmp due races with systemd LP:1707222" [Medium,Triaged] https://launchpad.net/bugs/172787622:35

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!