On 8/30/12 9:00 AM, Daniel DeLeo wrote:
" type="cite">The behavior is currently (pre-10.14) that both :stop and :disable ignore the non-existence of init scripts on ubuntu 10.04. Taking -l debug, but suppressing a bunch of ps output: This is with only action :disable [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: Processing service[lkdjsflksjd] on opscode-ubuntu-10-04.opscode.us [Thu, 30 Aug 2012 18:46:27 +0000] INFO: Processing service[lkdjsflksjd] action disable (test::default line 2) [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[lkdjsflksjd] falling back to process table inspection [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[lkdjsflksjd] attempting to match 'lkdjsflksjd' (/lkdjsflksjd/) against process list UID PID PPID C STIME TTY TIME CMD [....snip...] [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[lkdjsflksjd] running: false [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[lkdjsflksjd] already disabled - nothing to do This is with only action :stop [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: Processing service[alsdkjfalkdsjfla] on opscode-ubuntu-10-04.opscode.us [Thu, 30 Aug 2012 18:46:27 +0000] INFO: Processing service[alsdkjfalkdsjfla] action stop (test::default line 6) [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[alsdkjfalkdsjfla] falling back to process table inspection [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[alsdkjfalkdsjfla] attempting to match 'alsdkjfalkdsjfla' (/alsdkjfalkdsjfla/) against process list UID PID PPID C STIME TTY TIME CMD [...snip...] [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[alsdkjfalkdsjfla] running: false [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[alsdkjfalkdsjfla] already stopped - nothing to do This is with action [:stop, :disable] [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: Processing service[dfglkj3b23n] on opscode-ubuntu-10-04.opscode.us [Thu, 30 Aug 2012 18:46:27 +0000] INFO: Processing service[dfglkj3b23n] action stop (test::default line 10) [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] falling back to process table inspection [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] attempting to match 'dfglkj3b23n' (/dfglkj3b23n/) against process list UID PID PPID C STIME TTY TIME CMD [...snip...] [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] running: false [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] already stopped - nothing to do [Thu, 30 Aug 2012 18:46:27 +0000] INFO: Processing service[dfglkj3b23n] action disable (test::default line 10) [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] falling back to process table inspection [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] attempting to match 'dfglkj3b23n' (/dfglkj3b23n/) against process list UID PID PPID C STIME TTY TIME CMD [...snip...] [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] running: false [Thu, 30 Aug 2012 18:46:27 +0000] DEBUG: service[dfglkj3b23n] already disabled - nothing to do And I know that at my previous job I left a lot of chef code behind that assumed that the latter case behaved exactly like that and will break with the new behavior. I put a lot of rambling in the ticket about why I disgree and believe that the current behavior is more desired since generally what I'm trying to do is write policy language which is "please make sure telnetd is never running anywhere" and if the init script (or upstart, or systemd, or xinetd config) simply doesn't exist, then I'm fine with that. Throwing exceptions and making me deal with them because on some systems it is named telnetd instead of telnet, and some systems its inetd instead of upstart or sysv, and some system may not have the package installed at all is just making me think about edge cases that I don't care about to get my job done -- and once you hit thousands or tens of thousands of servers to manage this just becomes abusive 'shoulds' -- at that level while you 'should' know the starting state of all your systems, the reality is that you don't, not completely anyway. |
Archive powered by MHonArc 2.6.16.