/srv/irclogs.ubuntu.com/2016/08/04/#cloud-init.txt

=== rangerpbzzzz is now known as rangerpb
rangerpbsmoser, larsks mind peeking at https://code.launchpad.net/~bbaude/cloud-init/azure_dhcp ? it contains the rework we discussed yesterday.13:45
smoserrangerpb, reading13:46
rangerpbim updating the commit msg now too13:46
rangerpbsmoser, also wondering if you wouldnt mind peeking at https://code.launchpad.net/~bbaude/cloud-init/rh_sub_rm_first which is a trivial change too.  <-- larsks fyi13:50
rangerpbheaded offline for a bit...back in about 90 minutes or so14:02
smoserk. i'll have it for you when you return14:02
=== rangerpb is now known as rangerpbzzzz
smoserharlowja, please ping when you're in.14:40
harlowjasmoser ping a ling16:54
harlowjaso mr.version16:54
harlowjaha16:54
smoserhey16:57
smoseryeah.16:57
smoserso. we definitely can't pick up a runtime dependency for something so silly16:57
harlowjak16:57
harlowjathat should be fine16:57
harlowjawe should be able to just do16:58
smoserand even build-time is a pain. i'm perfectly fine to take the convention of pbr16:58
harlowja>>> import pkg_resources16:58
harlowja>>> pkg_resources.get_distribution("pbr").version16:58
harlowjafor example16:58
smoserbut only if you have that available in build16:58
smoserright?16:59
harlowja(to get whatever version is installed)16:59
harlowjaeveryone has pkg_resources16:59
harlowja:-P16:59
harlowjareplace 'pbr' there with 'cloud-init'16:59
harlowjaha16:59
smoseri'm confused.16:59
harlowjaso the runtime dependency would be for version.py?16:59
harlowjamaybe i'm confused eto16:59
harlowjaha16:59
smoserso runtime, yeah.17:02
smoserso can't pick up runtime17:02
smoserbut even the build time is a pita17:02
smoserand i'd like to avoid it17:02
harlowjameh17:02
smoseri think its more than just pkg_resources17:02
harlowjafor build time, meh, what do u do17:03
smoseri have to have pbr at some sufficient version17:03
harlowjau either create your own pbr thing17:03
harlowjaor use pbr lol17:03
smoserhow hard is this though?17:03
harlowjaif u want to actually provide a useful deb and rpm version at build time17:03
smoseri'm fine to follow their versioning scheme17:03
harlowjaits sorta a pita that i don't want to recreate, lol17:03
smoserhow is it hard?17:03
harlowjaits complicated, not hard17:04
smoserit can't be that complicated.17:04
smoseri'm happy with git-describe17:04
smoserit gives you 3 tokens of information17:04
smoser last_tag_on_branch, commits_since_tag, hash17:04
smoseryou can only put those in so many different orders17:05
harlowjaya, hash is useless in redhat17:05
harlowjain rpms17:05
smoserits useful17:05
smoseryou just hide it behind something like commits_since_tag17:05
harlowjahttps://github.com/openstack-dev/pbr/blob/master/pbr/version.py#L353 has some details around why its such a pita17:07
harlowjai just don't have much desire to recreate any of that crap17:07
harlowjahttps://specs.openstack.org/openstack/oslo-specs/specs/juno/pbr-semver.html#proposed-change has more details17:08
harlowjaif u really want to recreate all that, go ahead i guess, i just don't care much to, lol17:08
harlowja"Provide a new command (deb-version) to output Debian package version compatible version strings. This primarily involves translating PEP-440 precedence rules into Debian ~ and . component separators.17:09
harlowjaProvide a new command (rpm-version) to output RPM version metadata for incorporation in RPM versions using the ENVRA format. As RPM lacks a ‘before’ operator (~) the primary method for translation is to treat pre-release and dev builds as release builds of next lowest version to drive the sort order above all actual releases of the version below. We assume that no version will ever have more than 9998 patch/minor releases. E.g. 1.2.0.dev5 is17:09
harlowja rendered as 1.1.9999.dev5. 1.0.0.dev5 would be rendered as 0.0.9999.dev5 and finally 0.0.0.dev5 would also be rendered as 0.0.0.dev5 to avoid negative version numbers.17:09
harlowja"17:09
smoserharlowja, you are correct that this is a pita17:51
=== rangerpbzzzz is now known as rangerpb
harlowjaya, i mean, ya, we can do something similar17:56
harlowjasure, (although i don't really want to code it/verify its correctness, ha)17:56
smosercan pbr parse a string for me ?17:58
smoserand tell me what it thinks debiand and rpm versions shoudl be ?17:58
harlowjahmmmm17:59
harlowjadon't think so17:59
harlowjasome other package might be able to17:59
smoserthis is crap harlow18:03
smoserversion.SemanticVersion(0, 7, 6, dev_count=100).debian_string()18:03
smoser0.7.6~dev10018:03
smoseri'd have thought i was saying 0.7.6 + 100 commits18:03
smoserand it gave me ~ which is < 0.7.618:03
harlowjalol18:05
harlowjau might want to try https://github.com/openstack-dev/pbr/blob/master/pbr/version.py#L121 ?18:07
harlowjaor seeing what https://github.com/openstack-dev/pbr/blob/master/pbr/packaging.py#L592 does18:08
harlowjaor https://github.com/openstack-dev/pbr/blob/master/pbr/packaging.py#L69118:08
smoserharlowja, it sure looks to me like my versioning scheme works for both debian and rh18:09
smoserif it is a tag, then you use Major.Minor.Micro18:09
smoserif not, then you use18:09
smoser Major.Minor.Micro+Commits.gHASH18:10
harlowjaso "+" is addition there?18:10
smoserit just means greater18:11
smoseri am pretty sure.18:11
harlowjaya, i don't think that works in rpms from what i remember18:11
harlowjabut maybe larsks can comment18:11
larsksharlowja: what am I commenting on?18:12
* larsks reads...18:12
larsksI think we should be following https://fedoraproject.org/wiki/Packaging:Naming?rd=Packaging:NamingGuidelines w/r/t rpm versioning.18:12
larsksI suspect you can use '+' in a release if you want (that is, I don't think it's prohibitied), but it's not magic in any way.18:13
smoserlarsks, i'm not sure i follow18:15
larsksI think you are asking if "Major.Minor.Micro+Commits.gHASH" is a good versioning scheme for packages, yes?  Or did I misread? Apologies if so.18:16
smoseri'm saying that for snapshots of upstream, calling that the "upstream version" is sufficient.18:16
smoserif you want to suggest something else, i'm ok with that.18:17
larsksI'm still not following, sorry.  You are proposing that e.g., brpm should produce packages with this versioning scheme?  Or something else?  If it's just a documentation reference to the upstream version that seems lovely.18:17
smoserso, yeah. if you run 'brpm' on trunk, you'd get a rpm that had a version like that.18:18
smoserif you ran it with 0.7.7, you'd get '0.7.7'18:18
larsksI guess if those rpms never really go anywhere other than a local development host it doesn't really matter.18:19
smoserwhat versoinoing would you use for your packaging ?18:19
smoseryou'd probably just use a serial incrementer on the releases youd done18:19
smoserright?18:19
larsksThe doc I pointed at (the fedora packaging guidlines), which is pretty much what I implemented in my changes to brpm.18:19
larsksSo, <name>-<version>-<release>.<date>git<commit_id>18:20
harlowja* if those rpms never really go anywhere other than a local development host it doesn't really matter.18:20
harlowjahmmm, but they will be going somewhere else, ha18:21
larsksharlowja: are they?18:21
larsksharlowja: none of the downstream rpm distributions use brpm for building packages.18:21
harlowjasucks to be them18:21
harlowja?18:21
larsksI dunno about that.18:21
larsksBut that is the current situation.18:21
smoser:)18:21
harlowjareality is i don't plan on waiting around for downstream rpm distributions :-P18:22
larsksharlowja: i am not sure I follow your comments.18:22
larsksIn what way would you need to wait on them?18:22
harlowjawait for a change to filter through the pipeline ---> downstream rpm distributions18:22
harlowjato images that i can them use18:23
harlowja*then use18:23
harlowja(in the godaddy cloud)18:23
larsksAh, I see.18:23
harlowjaalso need to add in a godaddy specific module to cloud-init, so i'll be repacking anyway, and cloud.cfg will require tweaks for that18:23
larsksIt seems like that would happen in any case, regardless of what they were using for the spec file, especially for enterprise distributions, right?18:23
larsksThere is almost always going to be delay between upstream release and downstream packaging.18:24
harlowjaidk, i'm not a enterprise distributor :-P18:24
harlowjain the world of the future, no i don't like that delay and i think its messed up18:24
harlowjain the world of today, sure it probably is a delay18:24
larsksOkay.  Anyway, back to smoser's question, I would personally adopt the versioning scheme recommended in the fedora docs, but for our purposes here I don't think it matters one way or the other.  As long as release <N+1> is lexically greather than release <N>, it should all be okay.18:26
harlowjais that in part cause of the lack of usage of brpm?18:29
harlowja(why it doesn't matter)18:29
smoserhttp://paste.ubuntu.com/22207121/18:31
smoserthat compares version info like18:31
smoserhttp://paste.ubuntu.com/22207177/18:31
harlowjawoah, shell18:31
harlowjalol18:31
larskssmoser: I was curious about whether something like 0.7.7-10-g1234567 will be > 0.7.7-1-g1234567.  If not, one could zero-pad the commit count.18:34
smoseryou can't put a - in an upstream version in debian18:35
smoserstupid18:35
smoserwait18:35
smosernot saying *you're* stupid18:35
smoserstupid that debian issue18:35
smoserlarsks, the + does seem to work, and honestly make sense.18:36
smoserright now we're 0.7.6+some-commits18:36
larsksAwesome. Have at it :)18:36
smoserthe read-version stuff would have to be updated as it gets 0.7.7 now.18:36
smoserbut tath is ok.18:36
harlowjaand for a change of topic18:44
harlowjasmoser any thoughts on https://issues.jenkins-ci.org/browse/JENKINS-3018318:44
harlowjahttps://github.com/jenkinsci/acceptance-test-harness/blob/master/src/test/resources/openstack_plugin/cloud-init  is the cloud-init file that uses18:45
harlowjai think in part its because runcmd probably shouldn't be used18:45
harlowjaor the module ordering needs to be adjusted18:45
harlowjahttps://issues.jenkins-ci.org/browse/JENKINS-30183?focusedCommentId=266029&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-26602918:45
harlowjaor someones package doesn't set the right ordering for sshd to start18:47
harlowjait almost seems like whats wanted is a init-run-cmds there18:51
harlowjaor moving runcmd into the cloud_init_modules for this case18:51
harlowjaso that sshd doesn't start until after thats done18:51
smoserso they want to lock sshd starting until its done?18:52
harlowjaya18:52
smoserah. i see.18:53
smoserjenkins ssh's in18:53
harlowjaany other way besides adjusting the module ordering that u can think of?18:53
harlowjaya, they do https://github.com/jenkinsci/acceptance-test-harness/blob/master/src/test/resources/openstack_plugin/cloud-init#L16 and line 22 there18:54
harlowjato work around this18:54
smoserdoes jenkins retry ?18:54
smoserif it can't get in.18:54
smoseri suspect yes18:54
harlowjaya, but the desire i think is to not allow sshd at all until user data scripts have all ran18:54
harlowjaso that they know that user data scripts have finished before jenkins (the master) starts trying to connect in18:54
harlowjawhich it does via ssh18:55
harlowja(to establish the master <-> slave connection)18:55
smoserwell, a boothook could disable sshd (and the stop it to make sure)18:55
smoserand then start it in runcmd18:55
harlowjaright, that'd work to18:55
smoseralso, if they did not put the ssh-authorized-keys in under 'users'18:56
harlowjathe weird part (or harder part) is that that plugin allows for user specified cloud userdata18:56
smoserbut wrote them when they're done18:56
harlowjaso people can override it and not do that18:56
harlowjaand screw themselves, ha18:56
harlowjabb18:57
smoseri've wanted to be able to block ssh from starting until users sare configured before.18:57
smoserso that if you ever got denied you'd not need to try again.  either connection closed or youre in18:57
smoserbut never wanted to not start sshd till later.18:57
smoserubuntu can disable sshd easily enough18:58
smoserharlowja, 2 other options19:11
smosera.) rather than having jenkins just bang on the ssh port until gets in, you could have phone_home tell it it is ready19:12
smoserb.) you coudl have jenkins block until a /run/all-done is there19:12
smoser(or cloud-init's /run/cloud-init/result.json)19:12
harlowjaah, ya, the '/run/all-done' might be a good idea19:30
hans__hey folks, had a question on whether anything has changed in recent ubuntu images as far as initial mount and format of the ephemeral drive. we have started seeing this lately: Stderr: 'mke2fs 1.42.13 (17-May-2015)\n/dev/sdb1 is mounted; will not make a filesystem here!\n'20:29
hans__we think this might be a race condition between mnt.mount and cloud-config.service, but it seems to be a new issue20:35
smoserhans__, this is azure ?20:51
hans__@smoser, yes20:52
hans__@smoser: it looks like mnt.mount is doing a mount before cloud-init gets there sometimes, and we see 'Device /dev/sdb1 has Temporary Storage ntfs'20:54
hans__@smoser, then mke2fs fails - is it expected that the drive is unmounted before cloud-init gets there?20:55
smoserhans__, yeah, thats probably true.20:56
smosernothing is stiopping the mounts from occuring20:56
=== rangerpb is now known as rangerpbzzzz

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