Commit Graph
121 Commits
Author SHA1 Message Date
Hans Krijger c93a969f5c Merge 2.2.20 (#1014)
* hotfix to remove purge; update version to 2.2.20

* update test data

* update test data

* update purge; pep8 fixes

* unit tests

* readability, unit tests
2018-01-23 17:27:48 -08:00
Christopher Boumenot 74350e39ea randomize package URLs (#1012) 2018-01-19 17:30:25 -08:00
Christopher Boumenot 1eeaaf0e77 Randomize the URL used for package download (#1010) 2018-01-18 22:43:41 -08:00
Christopher Boumenot 27c16553f5 ship warning and errors logs to Geneva (#991) 2018-01-17 13:58:18 -08:00
Will Pearson fdb2b8a404 Use cached extension version manifest if available (#919)
* Use cached extension version if available

* Pass etag to get_ext_handler_pkgs

* Fix failing stale goal state test

* On a stale goalstate, restart extension handling

Also, simplify the fetch manifest logic which identifies a stale
goal state

* Address first round of PR comments.

* Get rid of stopgap loop for stale goal states

* Use previous pattern to populate ext manifest cache

* Simplify get_ext_manifest
2018-01-16 17:26:16 -08:00
Hans Krijger 6f00f4d11d switch http errors telemetry to INFO (#1000) 2018-01-11 21:54:39 -08:00
Hans Krijger a94e69c773 do not log telemetry about io errors; pep8 fixes (#998) 2018-01-10 15:33:15 -08:00
Hans Krijger 0678fe01b0 Emit log message when work is done (#989)
* fix ubuntu class hierarchy

* conditionally log the process goal state message
2018-01-04 16:06:18 -08:00
Christopher Boumenot 210ada4928 do not blacklist due to IOErrors (#988) 2018-01-04 12:36:40 -08:00
Christopher Boumenot cb24a05b32 silence noisy console logs (#985) 2018-01-04 12:32:31 -08:00
Christopher Boumenot 2d75af35f3 bug: misnamed keyword argument (#984) 2018-01-04 12:30:35 -08:00
Christopher Boumenot 30e638ddab capture stacktrace (#970) 2018-01-03 11:46:48 -08:00
Christopher Boumenot 5317be3831 Report prolonged report status failures (#971)
* Report prolonged report status failures

The agent report transient failures, but this is not very indicative of
customer failures.  The transient failures generally resolve themselves, so the
transients are not very useful for a dashboard.  This change tracks failures
that repeat for 15 minutes, and then report them.  If an operation fails and
succeeds within 15 minutes, the timer resets.  It must be a continual stream of
errors for 15 minutes for this telemetry event to trigger.

* default ErrorState's min_timedelta to a const
2018-01-03 11:45:11 -08:00
Will Pearson e2ce35427b Send telemetry event when an extension update is skipped. (#967) 2018-01-02 15:33:01 -08:00
Will Pearson ad7158bfdc Bug fix for upgrade GUID change (#979)
* Bug fix for upgrade GUID change

Reduce log spam from skipping an upgrade based on the GUID staying the same.

Ensure that the Agent reports the correct extension version and its state as enabled in cases where the GUID is the same.

Fix unit testing for the upgrade GUID feature

* Log same upgrade guid on each new goal state

* Rename "guid" variables to "upgrade_guid"
2018-01-02 15:02:12 -08:00
Christopher Boumenot a7bba758f1 Compute duration for download and other events 2017-11-28 10:32:02 -08:00
Brendan Dixon 0026f4516d [#929] -- wire.py#update_goal_state does not handle out-of-date GoalState errors
Improved HTTP error messages
Added HTTP IOError event
Convert internal error numbers into useful names

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-11-01 11:55:02 -07:00
Brendan Dixon 1f5ef8d47f Improved error logging
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-10-27 11:58:22 -07:00
Brendan Dixon 74bd379d17 Remove safe-deploy code
Adjust delay and retry values for failed HTTP requests
Ensure current agent is not removed from disk
Add operation to extension error events
Improve tracking of child agent exceptions

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-10-26 16:30:24 -07:00
Brendan Dixon fb16cba28b [#822] -- Update docs
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-10-20 11:01:59 -07:00
Brendan Dixon 0352a85712 [#897] -- 'Target handler state' wall of errors
[#896] -- End of Line Comments are Not Supported nor Handled
[#891] -- Create a Telemetry Event to Track Custom Data Execution
[#884] -- Cleanup Old Goal State and Extension Cache
[#876] -- The agent should use a scaling back-off when retrying HTTP requests
[#869] -- The agent should report OS information in the correct JSON format.

Updated version to 2.2.18.1
Replaced errno.EREMOTEIO with fixed value (since the constant is not present in all Python 2.7 versions)

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-10-18 14:57:16 -07:00
brendandixon 7b94a9711a Merge pull request #880 from uiri/rolling
Rolling Extension Upgrades
2017-10-17 10:05:24 -07:00
Brendan Dixon e85d5327a4 [#908] -- Set Files to 0400 in /var/lib/waagent
[#906] -- Hardcoded value for sshd's ClientAliveInterval (180)
[#899] -- Improve HeartBeat Event
[#898] -- Send dummy status if extension fails to write a #.status file

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-10-17 09:18:46 -07:00
William Pearson 22b69b6485 Remove upgrade GUID *after* performing disable/uninstall 2017-10-10 16:56:16 -07:00
William Pearson 8663a92b16 Remove flag IsPartOfScaleSet 2017-09-27 13:14:20 -07:00
William Pearson 3f5480ad21 Rename ExtensionRollingUpgrade to IsPartOfScaleSet 2017-09-23 19:34:33 -07:00
William Pearson 15d835854c Fix comment in test code. Add log statements. 2017-09-18 15:19:12 -07:00
Brendan Dixon 76ac55bada Merge remote-tracking branch 'upstream/master' 2017-09-14 09:21:53 -07:00
brendandixon ef9c7ce970 Hotfix/2.2.17 (#883)
* [#879] -- OS.EnableFirewall=y breaks load balanced sets probing

Signed-off-by: Brendan Dixon <brendandixon@me.com>

* Set version to v2.2.17

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-09-13 18:45:39 -07:00
William Pearson bc2cdf2b23 Add explanatory comments for extension rolling upgrade 2017-09-13 15:56:00 -07:00
Brendan Dixon 693a40aac6 Renamed safe-deploy files and objects to make purpose clear
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-09-12 13:31:17 -07:00
Brendan Dixon d6da347727 Added safe deployment support
[#875] -- The agent should include the incarnation number in ProcessGoalState events
[#874] -- The interval allowed before forcibly terminating the child process is too long

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-09-11 15:47:25 -07:00
William Pearson bc0ecc51ba Add unit testing for rolling upgrade extension change
Fix typos caught by testing
Properly handle enabled->disabled/uninstall state change and
disabled/uninstall->enabled state change
2017-09-07 13:49:34 -07:00
William Pearson 197b9fe5d9 Only update upgrade GUID after a successful upgrade 2017-09-07 09:55:29 -07:00
William Pearson 4bc735d169 Report the upgradeGuid back to CRP in the status blob 2017-09-07 09:34:40 -07:00
William Pearson 76f37fea1e Add extension rolling upgrade logic
Parse upgrade GUID and rolling upgrade flag from XML
Save old GUIDs
Only upgrade if the flag is False or the old GUID does not match the new GUID
2017-09-06 13:44:56 -07:00
Brendan Dixon 9b92a7705a Align HTTP status code handling with HostPlugin
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-08-24 11:40:18 -07:00
Brendan Dixon ace5d8e701 Emit Firewall events
Signed-off-by: Brendan Dixon <brendand@microsoft.com>
2017-08-21 11:42:09 -07:00
Brendan Dixon e247e7b2f2 Restrict access to Azure fabric services
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-08-17 13:12:34 -07:00
Brendan Dixon 285aeff238 [#783] -- The agent fails to use the standard Linux environment variables for HTTP proxy
[#830] -- Ensure VM identifier is properly ordered

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-08-15 10:21:52 -07:00
Brendan Dixon d0b583cc6f [#823] -- Show config options in use
[#784] -- Adjust http retry and logging

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-08-11 09:37:33 -07:00
Brendan Dixon 052a99f856 [#808] -- The agent should more gracefully handle out-of-space disk errors (IOError 28)
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-08-02 12:38:54 -07:00
Hans Krijger d2aa726373 unit test fix 2017-08-01 13:24:03 -07:00
Hans Krijger c2604c6f20 add duration to log messages; minor cleanup 2017-08-01 11:26:49 -07:00
Brendan Dixon 2d8f620ec0 [#800] -- HostGAPlugin still use proxy while auto-updating
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-07-25 16:19:52 -07:00
Brendan Dixon c6173de894 [#801] -- Agent fails to clean-up PID files
[#811] -- Comments inline in /etc/waagent.conf cause config to not be read
[#812] -- Agent fails and isn't recoverable if an extension's log directory is not present anymore

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-07-25 13:57:13 -07:00
Brendan Dixon 3b5faa5968 [#807] -- The agent should not emit duplicate events
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-07-21 14:41:50 -07:00
Brendan Dixon 8530016e71 Make version recognition more flexible
Report pre-provisioned VMs as ready
Reworked optional agent support

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-06-29 16:01:25 -07:00
Brendan Dixon eb3662e0e1 [#769] -- HostGAPlugin requests should never go through proxy
[#764] -- waagent -configuration-path:/path -start not take effect
[#761] -- MetadataProtocol has no client object
[#757] -- deprovision is executed even if input 'n'
[#754] -- /etc/resolv.conf is removed if create a VM base on an specialized image
[#746] -- Agent WALinuxAgent-2.2.12 is blacklisted - skipping download
[#740] -- Duplicate logging on RHEL/CentOS

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-06-21 13:41:05 -07:00
Brendan Dixon 90cf4f680f [#711] -- There are too many log print to /var/log/waagent.log
[#714] -- Questionable split call in common/conf.py
[#717] -- Remove extension logs during deprovision
[#720] -- Reset of RDMA drivers not taking effect
[#724] -- Location of configuration file should be editable issue

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-05-23 15:45:33 -07:00