<\/p>\n\r\n$ mc-puppetd --with-class roles::dev_server disable\r\nDetermining the amount of hosts matching filter for 2 seconds .... 1\r\n\r\n.\r\n\r\nFinished processing 1 \/ 1 hosts in 3252.13 ms\r\n<\/pre>\n<\/code><\/p>\n
We’ll attempt a runonce, this should fail because we just disabled the agent.<\/p>\n
<\/p>\n\r\n$ mc-puppetd --with-class roles::dev_server runonce -v\r\nDetermining the amount of hosts matching filter for 2 seconds .... 1\r\n\r\ndev1.your.net status=false\r\n Lock file exists \r\n\r\n\r\n---- puppetd agent stats ----\r\n Nodes: 1 \/ 1\r\n Start Time: Sun Nov 29 23:02:30 +0000 2009\r\n Discovery Time: 2006.38ms\r\n Agent Time: 47.62ms\r\n Total Time: 2054.00ms\r\n<\/pre>\n<\/code><\/p>\n
Let’s enable it and then try to run again.<\/p>\n
<\/p>\n\r\n$ mc-puppetd --with-class roles::dev_server enable\r\nDetermining the amount of hosts matching filter for 2 seconds .... 1\r\n\r\n.\r\n\r\nFinished processing 1 \/ 1 hosts in 9.81 ms\r\n\r\n$ mc-puppetd --with-class roles::dev_server runonce\r\nDetermining the amount of hosts matching filter for 2 seconds .... 1\r\n\r\n.\r\n\r\nFinished processing 1 \/ 1 hosts in 2801.82 ms\r\n\r\n<\/pre>\n<\/code><\/p>\n
I think this is a good way to orchestrate these type of maintenance window and I hope someone finds it useful.<\/p>\n","protected":false},"excerpt":{"rendered":"
It’s typical during maintenance windows that you would want to disable puppet, do your work, enable again and do a run. Or perhaps you don’t run puppet all the time, you just want to kick it off during your maintenance window. Doing this with ssh for loops is slow and annoying, here’s a way to […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[1],"tags":[121,78,21],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1179"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=1179"}],"version-history":[{"count":8,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1179\/revisions"}],"predecessor-version":[{"id":1717,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1179\/revisions\/1717"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=1179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=1179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=1179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}