#theforeman

/

      • gkoch
        ehelms I see pulp-manage-db, earlier there was a lot of mongo. I don't see any celery at the moment.
      • bkorren has quit
      • niklasye joined the channel
      • brunowcs has quit
      • John_B
        From what I remember it's pulp-manage-db+mongo->pulp-manage-db->pulp-manage-db+mongo ;)
      • mbacovsk has quit
      • raphink joined the channel
      • gkoch
        I straced that pid and it looks like it is doing a stat on the pulp symlinks
      • ki0 joined the channel
      • MikeLupe joined the channel
      • trueneu has quit
      • bryan_kearney1 has quit
      • v1k0d3n joined the channel
      • pbbunny0801 joined the channel
      • devmodem has quit
      • dendazen has quit
      • While Katello/Foreman is down, does anyone know how to get the ENC cached yaml files to work? They're present on my servers, they just don't get used when node.rb can't talk to the server.
      • elisiano
        howdy folks. question about the APIs. When creating a host I get the following: {u'error': {u'message': u'undefined method `each\' for "ptable_id":String'}} but I'm sure that ptable_id is an int (I'm creating the dictionary in python and using requests to interact with foreman's api). Am I doing something obviously wrong?
      • gwmngilfen
        "each" implies it's expecting an arry
      • what's the actual api call you're making?
      • gkoch: hmm, i thought that worked. gimme 5 to finish thi s up and i'll go re-read the enc script
      • mheldebr has quit
      • gkoch
        gwmngilfen thanks. I looked at the script and it appears that it should read the cache, but it just complains `Error retrieving node host.example.com: Net::HTTPServiceUnavailable Check Foreman's /var/log/foreman/production.log for more information.`
      • elisiano
        gwmngilfen: I got one step ahead, now I'm actually converting the dict to json and added the content-type headers
      • ki0 joined the channel
      • now a nastier one: {u'error': {u'message': u'Environment(#55656080) expected, got String(#3587540)'}}
      • gkoch
        gwmngilfen I see the cached yaml files in /var/lib/puppet/yaml/foreman. All owned by puppet:puppet.
      • trueneu joined the channel
      • gwmngilfen
        elisiano: again, thats a type mismatch, so i'd ask to see the call/parameters again :)
      • elisiano
        shoot, spotted it (I didn't convert environment to environment_id). Thanks gwmngilfen ! :D
      • gwmngilfen
        happy to be the dog in the corner ;)
      • aupadhye_ has quit
      • jgarr joined the channel
      • jgarr
        is anyone running a stand alone candlepin server?
      • sjoeboo joined the channel
      • acidrainfall
        I don't think I know anyone that masochistic
      • sjoeboo has quit
      • gwmngilfen
        gkoch: just to make sure we debug the same thing, are you on the latest version of https://github.com/theforeman/puppet-foreman/bl... ?
      • witlessb has quit
      • smeyer joined the channel
      • jomitsch is now known as jomitsch-afk
      • gkoch
        gwmngilfen Yes, that's the file - from the v5.2.0 of the foreman module on puppet forge. Same md5sum.
      • gwmngilfen
        sweet, having a dig now
      • smeyer has quit
      • gkoch: ah, you might be on to something here
      • if i'm reading this right, the enc call is properly rescued with a timeout reading the cache - https://github.com/theforeman/puppet-foreman/bl...
      • but
      • the prior call to upload facts - https://github.com/theforeman/puppet-foreman/bl... - is not wrapped
      • and that will also need to hit foreman to upload
      • try commenting out the upload section (323-338) and try it then
      • josephmagen has quit
      • jtomasek_ has quit
      • gkoch
        I now get /etc/puppet/node.rb:362: syntax error, unexpected keyword_rescue, expecting keyword_end rescue => e
      • gwmngilfen
        oh whoops
      • gkoch
        Commented out 323-338
      • gwmngilfen
        ugh, i cannot read
      • just comment 335-338
      • gkoch
        Back to the original error now
      • gwmngilfen
        hmm
      • paste the error again
      • rimma joined the channel
      • gkoch
        Error retrieving node da1haln01pe.stsky.biz: Net::HTTPServiceUnavailable Check Foreman's /var/log/foreman/production.log for more information.
      • gwmngilfen
        aha
      • its not a timeout error code, gotcha
      • so 347 only rescues certain error types
      • you could try adding Net::HTTPServiceUnavailable to that list
      • TastyChalk has left the channel
      • gkoch
        So now I have lines 335-338 commented out and I've added Net::HTTPServiceUnavailable to line 347 and I still get the Net::HTTPServiceUnavailable error
      • gwmngilfen
        intriguiging
      • dcaplan has quit
      • the message comes from line 199, by the way, i'd have expected that raise to be caught on line 347
      • oh wait, i see
      • ugh, thats ugly
      • got it
      • gkoch: not the final solution, but for testing, add RuntimeError to the list on 347
      • gkoch
        That did the trick
      • dcaplan joined the channel
      • gwmngilfen
        so we have two problems
      • gkoch
        I uncommented 335-338 and it still works.
      • jgarr
        acidrainfall: :( I'm begining to think the same
      • gwmngilfen
        1) upload_facts will bomb before we ever get to the caching - be good if you could uncomment that and retest though
      • ah ok
      • acidrainfall
        jgarr: What are you trying to do anyway?
      • gwmngilfen
        so the issue is that rather than atimeout, your apache is still up and returning an error
      • thats fixable, could you submit a bug?
      • gkoch
        And I removed the Net::HTTPServiceUnavailable and it still works
      • The RuntimeError added on 347 was all that was needed
      • jgarr
        acidrainfall: run candlepin in a container. external db
      • gwmngilfen
        yeah, i figured it would, line 199 obscures the error in a nasty way
      • trueneu has quit
      • jgarr
        acidrainfall: there's some examples but they run postgres in the container and don't save pgdata. It's just for testing releases as far as I can tell https://github.com/candlepin/candlepin/tree/mas...
      • gwmngilfen
        gkoch: a bug to http://projects.theforeman.org/projects/puppet-... would be awesome, if you're willing
      • jgarr
        sorry, they don't run pg in the container. they link them together but I don't want pg in a container. I already have db servers
      • gkoch
        gwmngilfen always happy to file a bug - you all help us out a lot as it is. http://projects.theforeman.org/issues/15539
      • gwmngilfen
        gkoch++
      • agoldboi has quit
      • MikeLupe has quit
      • gkoch
        gwmngilfen now this is interesting, I've changed the file on both my puppet masters, and for some reason when I run puppet, it still complains that node.rb returns 1. When I run it myself, it works just fine.
      • gwmngilfen
        are you running that as puppet or root?
      • acidrainfall
        jgarr: Ah. Way out of my league. Sorry :(
      • Bye all!
      • gwmngilfen
        o/
      • gkoch
        gwmngilfen good call - I'm running it as root
      • Seems to work at puppet also though
      • gwmngilfen
        hmm
      • is the axit status actually 0?
      • *exit
      • gkoch
        No, it's nothing
      • gwmngilfen
        as in, echo $? == 0
      • gkoch
        echo $? is just a blank line.
      • gwmngilfen
        that'll only work if its the very next command
      • even hitting enter will clear $? iirc
      • gkoch
        yeah, I did it as the very next command
      • I just tested it several times, it only returns 0 sometimes.
      • gwmngilfen
        v odd
      • i'd at least expect consistency
      • gkoch
        When I run puppet it is saying it returned 1 though. Not exactly sure what else is different about puppet running the script vs root
      • other than the obvious of the different user
      • gwmngilfen
        there isn't much
      • the script tries to switch user to puppet anyway, we just ask to make sure
      • i'm not really sure how to debug an inconsistent exit status
      • gkoch
        That makes 2 of us. I just ran it like 10 times as puppet and got 0 each time.
      • gwmngilfen
        i can only suggest very basic thing like logging debug statements to a file at various points in the enc to see how far it's getting
      • gkoch
        More than happy to try that if you have suggestions of where to stick debug log lines
      • gwmngilfen
        so the line you'd want is
      • File.open('/tmp/debugenc', 'w') {|f| f.write('here') }
      • gkoch
        FWIW httpd is not running on foreman - we're waiting for our ridiculously large pulp upgrade to finish.
      • cfoo has quit
      • gwmngilfen
        yeah i saw the discussion with ehelms earlier
      • you can start from line 362 which is where the exit status is set to 1 if there's an error
      • put it inside the rescue and see if it logs
      • bbuckingham is now known as bbuckingham-afk
      • gkoch
        Nothing logged
      • gwmngilfen
        so, not hitting that
      • gkoch
        I moved the log line to 199, which we know we were hitting before, and still got nothing
      • chown puppet:puppet for the log file too
      • gwmngilfen
        interesting, thats called from 344
      • move it to 314
      • thats pretty much before anything happens
      • gkoch
        So weird. When I run it manually as root it logs
      • gwmngilfen
        at 314?
      • gkoch
        Yep
      • rplevka has quit
      • And when I run it manually as puppet it does too
      • gwmngilfen
        but not running from the master?
      • waiiiiiiiiit
      • the master might be caching it
      • can you bounce the service?
      • gkoch
        I restarted apache (we use passenger)
      • gwmngilfen
        still nothing?