=== zz_natorious is now known as natorious
=== natorious is now known as zz_natorious
=== zz_natorious is now known as natorious
=== natorious is now known as zz_natorious
=== zz_natorious is now known as natorious
=== natorious is now known as zz_natorious
openstackgerritClaudiu Popa proposed stackforge/cloud-init: Add an API for loading a data source  https://review.openstack.org/20952013:57
=== zz_natorious is now known as natorious
Seth_Kar_Hey all, can anyone assist me with debugging chef on CentOS 7? I've already figured out to turn off SELinux, but if I run cloud-init --debug single -n chef it doesn't give any information. If I reboot I just get an error saying the cc_chef python module failed15:08
Seth_Kar_Is there any way to increase this verbosity during the reboot, or a way to properly re-run cloud-init after I have a shell?15:08
smoserSeth_Kar_, you likely have something in /var/log/cloud-init.log15:28
smoserlook for WARN15:28
smoserif you do not, then edit /etc/cloud/cloud.cfg.d/05_logging.cfg and comment out the line ' - [ *log_base, *log_syslog ]'15:30
smoseryou should also have output in /var/log/cloud-init-output.log15:30
Seth_Kar_smoser: I have the following WARN errors15:30
Seth_Kar_Aug 31 17:16:35 localhost cloud-init: 2015-08-31 17:16:35,047 - cloud-init[WARNING]: Stdout, stderr changing to (| tee -a /var/log/cloud-init-output.log, | tee -a /var/log/cloud-init-output.log)15:30
Seth_Kar_Aug 31 17:16:35 localhost cloud-init: Cloud-init v. 0.7.5 running 'modules:config' at Mon, 31 Aug 2015 15:16:35 +0000. Up 6.15 seconds.15:30
Seth_Kar_Aug 31 17:16:35 localhost cloud-init: 2015-08-31 17:16:35,509 - util.py[WARNING]: Running chef (<module 'cloudinit.config.cc_chef' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_chef.pyc'>) failed15:30
Seth_Kar_smoser: The same error is in /var/log/cloud-init-output.log15:31
Seth_Kar_Is there a way to manually run the chef recipe with additional debugging?15:31
smoserthere should be some message about what failed, or a stack trace or something.15:34
smoser'run the chef recipe' ?15:35
Seth_Kar_There is no message, it just says failed15:37
Seth_Kar_The running chef error is the only error I get15:37
Seth_Kar_Can I call the python script from the shell to debug?15:38
smoseras you did, 'single -n chef'15:42
smoserit really should have a sack trace or some thing .15:42
smosercan you pastebin the cloud-init.log and cloud-init-output.log ?15:42
smoseri realize you might potentially have sensitve infor ther15:42
harlowja_at_homei also have messed with the chef stuff at one point, so let me know to :)15:44
harlowja_at_homebut usually its always smoser fault15:44
openstackgerritMerged stackforge/cloud-init: Add an API for loading a data source  https://review.openstack.org/20952015:48
smoserclaudiupopa, ^ that merged, please do add the 'version=' thing.15:50
Seth_Kar_smoser: harlowja_at_home: https://gist.github.com/Seth-Karlo/266ecc9d5618f0b5b9cf16:00
harlowja_at_homeany idea whats in '/var/log/cloud-init-output.log'?16:01
Seth_Kar_If I run it on CentOS 6 I get a different error16:01
Seth_Kar_Sure, hang on16:01
smoserand /var/log/cloud-init.log .16:01
smoserwhat you did above makes perfect sense that it *should* show stuff.16:01
smoserbut... get /var/log/cloud-init.log16:01
Seth_Kar_Only two lines in /var/log/cloud-init-output.log16:01
Seth_Kar_2015-08-31 17:59:53,589 - cloud-init[DEBUG]: Logging being reset, this logger may no longer be active shortly16:02
Seth_Kar_Cloud-init v. 0.7.5 running 'single' at Mon, 31 Aug 2015 15:59:53 +0000. Up 2603.45 seconds.16:02
Seth_Kar_No change to /var/log/cloud-init.log16:02
harlowja_at_homebb, irc meeting16:02
=== natorious is now known as zz_natorious
=== zz_natorious is now known as natorious
=== natorious is now known as zz_natorious
=== zz_natorious is now known as natorious
harlowjak, back17:11
smoserOdd_Bloke, you have a minute ?17:14
smoseri'm trying to get my changes for reporting that i've most recently have in curtin into c loud-init (so you can be happy and they'll be synced).17:14
=== ndonegan_ is now known as ndonegan
natoriousare you guys doing weekly or bi-weekly openstack meetings for this proj?17:38
smosernatorious, we have a weekly meeting at 14:00:00 UTC18:16
smoserin this channel.18:17
natorioussmoser: ty sir.  Added to cal18:17
natoriouswhich day though lol?18:17
smoseroh silly me18:19
natoriousthere is another linux dev from rax that will be helping out too.  I'll pass this info along :)18:22
jlambert121i'm working on setting cloud-init up on a centos7 AWS image.  i'm trying to figure out how to disable the default centos yum repos (we have internal mirrors).  i can add/configure new repos without problem, but i can't seem to get [base] "enabled: false" set18:23
jlambert121if someone has an example link/insight it would be greatly appreciated18:24
gamenamehi guys.  I'm trying to figure out what "disable-ec2-metadata" does.  Should I take that out if I want to use metadata?20:07
smosergamename, it defaults to false20:57
smoserall that does is run the config module20:58
smoserthe config module, if it sees 'disable_ec2_metadata: true'20:58
smoserthen it will null-route the metadata service20:58
smoserthat way if you had sensitive data there, no one could see it without rooting system first.20:58
smoserjlambert121, maybe harlowja can say. i have to run, sorry.20:59
jlambert121smoser: thanks.  i've been banging on this all day without luck.  trying to get a bootcmd of 'rm -f /etc/yum.repos.d/*' to work right now, but it's an ugly hack20:59
jlambert121harlowja: if you have any other thoughts that'd be appreciated21:00
gamenamesmoser: Thanks!21:00
gamenamesmoser: "package_update"  defaults to "true". Correct?21:02
harlowjajlambert121 smoser ya, pretty sure that should disable the route stuffs21:13
jlambert121harlowja: i was trying to figure out how to modify the default yum repos on an image - thoughts?21:14
harlowjai think https://github.com/stackforge/cloud-init/blob/0.7.x/doc/examples/cloud-config-yum-repo.txt#L2 can be used to overwrite existing ones, but haven't tried it in a while21:15
harlowjaor u can use the write files approach to write out new files21:15
harlowjahttps://github.com/stackforge/cloud-init/blob/0.7.x/doc/examples/cloud-config-write-files.txt (for example)21:15
jlambert121harlowja: writing new ones works great with the yum plugin, but i can't seem to modify existing ones with it21:17
harlowjaya i guess https://github.com/stackforge/cloud-init/blob/0.7.x/cloudinit/config/cc_yum_add_repo.py#L74 is preventing that21:17
jlambert121on centos there are 4 repos defined in a CentOS-Base.repo file which seems to be confusing it21:18
jlambert121[base] is one of the repos - if i set up a repo named base with cloud-init it'll create a base.repo file, not modify the existing one (which doesn't seem like bad behavior), but i somehow need to get rid of the old [base] repo then21:19
jlambert121i was just going to try adding a 'rm -f /etc/yum.repos.d/*.repo' to the bootcmd and see if i could hack it up that way, but doesn't "feel" quite right21:20
harlowjaya, it's probably better to do something else, more native, but i'd just remove the specific repo files u know u want to overwrite for now21:20
harlowjathe code  @ https://github.com/stackforge/cloud-init/blob/0.7.x/cloudinit/config/cc_yum_add_repo.py#L71 should probably allow overwrite21:20
harlowjavs not21:21
jlambert121yeah, if repo_id is found, just modify the repo_config for that id21:21
jlambert121that was the behavior i expected anyway21:22
harlowjaya, when i created that (think it was me) probably was just being conservative21:22
jlambert121want me to open a GH issue for it? (it's beyond me to change)21:22
harlowjahttps://bugs.launchpad.net/cloud-init/ instead, GH issues will get automatically closed21:22
harlowjaGH is just a mirror21:23
jlambert121ahh, ok - i'll do that.  thanks for the help21:23
harlowjajlambert121 its never beyond u to change it ;)21:23
harlowjanever accept defeat, ha21:23
jlambert121harlowja: very true as i tell others with projects i ask for PRs on.  I should state it as: in the near future i'm not going to have time to learn python and make this change, but some day :)21:24
harlowjaso like the day after tommorow then?21:24
jlambert121yeah, something like that21:24
jlambert121after my 4 "number one priorities" at $dayjob get done and 6 number ones at $home :)21:25
gamenamehi guys.  How do I check what the default of "package_update" would be?21:26
harlowjacheck /etc/cloud/cloud.cfg21:27
harlowjahttps://github.com/stackforge/cloud-init/blob/0.7.x/cloudinit/config/cc_package_update_upgrade_install.py#L51 is all the keys that module uses21:27
harlowjaso if there is an entry for those keys in there, thats the default21:27
harlowjajlambert121 well u need to sleep less then, more doing #number ones21:27
harlowjaalthough don't to many number #2(s); if u do that alot u may want to see a doctor21:28
gamenameharlowja: entry in where?21:28
harlowjathe config file in the VM @ /etc/cloud/cloud.cfg21:28
harlowjathats typically where that stuff is stored21:28
gamenameharlowja: So, if there is a mention of a value in /etc/cloud/cloud.cfg, then that is the default?  Wouldn't that mean that /etc/cloud/cloud.cfg is not a config file at all, but a kind of key/value template file?21:30
harlowjadepends on what u typically call a config file21:31
harlowjato me a config file is things with settings that affect how some program runs21:31
harlowjaif thats key/values, binary, digits, if they affect how a program is ran, its config21:31
gamenameharlowja: So, what if there is no mention of a key in /etc/cloud/cloud.cfg? What then?  Does it take a default value then?21:32
harlowjaright, so then it starts merging 'configuration' together21:33
harlowjato form a final config that will be used21:33
gamenameharlowja: Merge the contents of /etc/cloud/cloud.cfg and what else?21:34
harlowjasoooo first its https://github.com/stackforge/cloud-init/blob/0.7.x/cloudinit/settings.py#L2921:34
harlowjathen /etc/cloud/cloud.cfg  merges into that21:34
harlowjathen things in /etc/cloud/cloud.cfg.d i think21:34
harlowjathen userdata and metadata get merged in21:35
harlowjaoh https://github.com/stackforge/cloud-init/blob/0.7.x/cloudinit/helpers.py#L25821:35
harlowjai think thats the list, from what i remember21:35
gamenameharlowja: ok.  So, how is the default for a given value, in this case "package_update", determined?  If that key isn't mentioned in /etc/cloud/cloud.cfg where is the default set?21:36
harlowjathe code that those config then can set a default if it so wants to21:37
harlowjathats the code, anything touching 'cfg' variable name there is extracting stuff21:37
harlowja*extracting stuff from the merged config21:37
gamenameharlowja: So, you're saying the only time there is a value for a key is when it is specifically set?21:39
harlowjaor the code that uses that key decided to set some default if it doesn't find a key21:39
harlowjaie 'pkglist = util.get_cfg_option_list(cfg, 'packages', [])'21:39
harlowjathat sets it to a empty list if its not found21:39
harlowjanow u may say this could be done via another way, but ya, thats the current way21:40
gamenameharlowja: ok.  How can I tell if "package_update" ever gets a value set for it?21:40
harlowjai think u can activate the debug module21:41
harlowjahttps://github.com/stackforge/cloud-init/blob/0.7.x/cloudinit/config/cc_debug.py will dump out the end cfg21:41
harlowjaif your version of cloud-init has that module21:41
gamenameharlowja: ok. So I have to turn on debug to tell what a default value is. Got it.21:42
harlowjawell and u have to look at the code for what it does when values aren't found in that config21:42
gamenameharlowja: Debug may not supply the answer?21:43
harlowjadebug will show u the initial config21:43
harlowjathat is given to each module, then u look at the code21:43
gamenameharlowja: Doesn't sound like its worth the time.  Nevermind.21:44
gamenamesmoser: Do I really need to run debug and scan the code just to find out the default of a keyword? wow...21:46
harlowjathere are multiple config sources, so its not just as simple as u would want it21:47

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