{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/beaker/issues/1239","repository_url":"https://api.github.com/repos/puppetlabs/beaker","labels_url":"https://api.github.com/repos/puppetlabs/beaker/issues/1239/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/beaker/issues/1239/comments","events_url":"https://api.github.com/repos/puppetlabs/beaker/issues/1239/events","html_url":"https://github.com/puppetlabs/beaker/pull/1239","id":176080975,"number":1239,"title":"(PA-514) Ensure windows reg value & startup type","user":{"login":"MosesMendoza","id":819133,"avatar_url":"https://avatars.githubusercontent.com/u/819133?v=3","gravatar_id":"","url":"https://api.github.com/users/MosesMendoza","html_url":"https://github.com/MosesMendoza","followers_url":"https://api.github.com/users/MosesMendoza/followers","following_url":"https://api.github.com/users/MosesMendoza/following{/other_user}","gists_url":"https://api.github.com/users/MosesMendoza/gists{/gist_id}","starred_url":"https://api.github.com/users/MosesMendoza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MosesMendoza/subscriptions","organizations_url":"https://api.github.com/users/MosesMendoza/orgs","repos_url":"https://api.github.com/users/MosesMendoza/repos","events_url":"https://api.github.com/users/MosesMendoza/events{/privacy}","received_events_url":"https://api.github.com/users/MosesMendoza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-09T18:47:35Z","updated_at":"2016-09-09T19:12:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/beaker/pulls/1239","html_url":"https://github.com/puppetlabs/beaker/pull/1239","diff_url":"https://github.com/puppetlabs/beaker/pull/1239.diff","patch_url":"https://github.com/puppetlabs/beaker/pull/1239.patch"},"body":"This commit adds two checks to make sure that after install our Windows agents\r\nstill have the appropriate registry value setting & location for\r\nRememberedPuppetAgentStartupMode (which is Disabled) and that the service does\r\nin fact have a startup type of Disabled. This is after a regression was\r\nintroduced in the MSI packaging which wrote these values to the wrong location\r\nand then they were not retained/honored after upgrade.\r\n\r\nThe MSI flag for setting startup mode is PUPPET_AGENT_STARTUP_MODE, and it\r\naccepts three values:\r\n\r\n* Automatic\r\n* Manual\r\n* Disabled\r\n\r\nOf these three, \"Automatic\" is the only on that does not correspond directly to\r\nthe equivalent value returned by `WMIC SERVICE` - for this case, `WMIC SERVICE`\r\nreturns \"Auto\" and not \"Automatic. \"Manual\" and \"Disabled\" are both returned\r\nas-is. For this reason, Automatic is treated as a special case in this commit.\r\n\r\nThis location (beaker) is chosen for this test because the puppet\r\nagent testing pipeline does not include its own testing for package-based\r\nupgrades, and at this time all systems that install MSIs will use this util. At\r\nsuch time as package acceptance testing of upgrades is added to puppet-agent,\r\nthese checks should be moved there.\r\n\r\nPaired with: Sean McDonald\r\n\r\nSigned-off-by: Moses Mendoza moses@puppet.com"},"comment":{"url":"https://api.github.com/repos/puppetlabs/beaker/issues/comments/246010655","html_url":"https://github.com/puppetlabs/beaker/pull/1239#issuecomment-246010655","issue_url":"https://api.github.com/repos/puppetlabs/beaker/issues/1239","id":246010655,"user":{"login":"MosesMendoza","id":819133,"avatar_url":"https://avatars.githubusercontent.com/u/819133?v=3","gravatar_id":"","url":"https://api.github.com/users/MosesMendoza","html_url":"https://github.com/MosesMendoza","followers_url":"https://api.github.com/users/MosesMendoza/followers","following_url":"https://api.github.com/users/MosesMendoza/following{/other_user}","gists_url":"https://api.github.com/users/MosesMendoza/gists{/gist_id}","starred_url":"https://api.github.com/users/MosesMendoza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MosesMendoza/subscriptions","organizations_url":"https://api.github.com/users/MosesMendoza/orgs","repos_url":"https://api.github.com/users/MosesMendoza/repos","events_url":"https://api.github.com/users/MosesMendoza/events{/privacy}","received_events_url":"https://api.github.com/users/MosesMendoza/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T19:12:12Z","updated_at":"2016-09-09T19:12:12Z","body":"This was also run against a contrived case with `PUPPET_AGENT_STARTUP_MODE` set to `Automatic`, with this relevant output confirming conversation of `Automatic` to `Auto` in WMIC:\r\n```\r\n kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) 12:10:17$ cmd.exe /c \"C:\\Windows\\TEMP\\install-puppet-msi-2016-09-09_12.10.16.bat\"\r\n\r\n    C:\\cygwin64\\home\\Administrator>start /w msiexec.exe /i \"C:\\PROGRA~3\\puppet-agent-x64.msi\" /qn /L*V C:\\Windows\\TEMP\\install-puppet-2016-09-09_12.10.16.log PUPPET_AGENT_STARTUP_MODE=Automatic\r\n\r\n    C:\\cygwin64\\home\\Administrator>exit /B 0\r\n\r\n  kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) executed in 23.87 seconds\r\n\r\n  kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) 12:10:41$ cmd.exe /c sc query puppet || sc query pe-puppet\r\n\r\n    SERVICE_NAME: puppet\r\n            TYPE               : 10  WIN32_OWN_PROCESS\r\n            STATE              : 4  RUNNING\r\n                                    (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)\r\n            WIN32_EXIT_CODE    : 0  (0x0)\r\n            SERVICE_EXIT_CODE  : 0  (0x0)\r\n            CHECKPOINT         : 0x0\r\n            WAIT_HINT          : 0x0\r\n\r\n  kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) executed in 0.50 seconds\r\n\r\n  kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) 12:10:41$ cmd.exe /c reg query \"HKLM\\SOFTWARE\\Wow6432Node\\Puppet Labs\\PuppetInstaller\" /v \"RememberedPuppetAgentStartupMode\" | findstr Automatic\r\n        RememberedPuppetAgentStartupMode    REG_SZ    Automatic\r\n\r\n  kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) executed in 0.29 seconds\r\n\r\n  kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) 12:10:41$ cmd.exe /c 'WMIC SERVICE where (Name=\"Puppet\" AND StartMode=\"Auto\") | findstr Puppet'\r\n    TRUE         TRUE        Puppet Agent  0           Win32_Service      Periodically fetches and applies configurations from a Puppet master server.  FALSE            Puppet Agent  Normal        0                      puppet  \"C:\\Program Files\\Puppet Labs\\Puppet\\sys\\ruby\\bin\\ruby.exe\" -rubygems \"C:\\Program Files\\Puppet Labs\\Puppet\\service\\daemon.rb\"  2388       0                        Own Process  TRUE     Auto       LocalSystem  Running  OK      Win32_ComputerSystem     KBKX9N0BNQK11WN  0      0\r\n\r\n  kbkx9n0bnqk11wn.delivery.puppetlabs.net (windows-2008-64-2) executed in 1.51 seconds\r\n```"}}
{"actor":{"display_login":"MosesMendoza"}}