Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.12.0.0 to master #3261

Merged
merged 241 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
9390ce5
Add support for Azure Clouds (#2795)
narrieta Apr 11, 2023
7de6133
Check certificates only if certificates are included in goal state an…
maddieford Apr 14, 2023
cb56656
Add tests for no outbound connectivity (#2804)
narrieta Apr 18, 2023
4ba20de
Use cloud when validating test location (#2806)
narrieta Apr 21, 2023
f02b31f
Redact access tokens from extension's output (#2811)
narrieta Apr 25, 2023
a46b9d2
Add @gabstamsft as code owner (#2813)
narrieta Apr 26, 2023
5382a5e
Fix name of single IB device when provisioning RDMA (#2814)
longlimsft May 8, 2023
0b7505e
Allow tests to run on random images (#2817)
narrieta May 10, 2023
328421b
Bug fixes for end-to-end tests (#2820)
narrieta May 16, 2023
df630ff
Enable all Azure clouds on end-to-end tests (#2821)
narrieta May 17, 2023
c7bef38
Add Azure CLI to container image (#2822)
narrieta May 17, 2023
3d713a2
Fixes for Azure clouds (#2823)
narrieta May 18, 2023
93b95ba
Add test for extensions disabled; refactor VirtualMachine and VmExten…
narrieta May 23, 2023
841ee1d
Fixes for end-to-end tests (#2827)
narrieta May 24, 2023
c864b45
Add test for osProfile.linuxConfiguration.provisionVMAgent (#2826)
narrieta May 26, 2023
ded1f10
Enable suppression rules for waagent.log (#2829)
narrieta May 26, 2023
82d486f
Wait for service start when setting up test VMs; collect VM logs when…
narrieta Jun 5, 2023
cce9665
Add vm arch to heartbeat telemetry (#2818) (#2838)
maddieford Jun 6, 2023
f9dcda9
Add regular expression to match logs from very old agents (#2839)
narrieta Jun 8, 2023
9cd9ed8
Increase concurrency level for end-to-end tests (#2841)
narrieta Jun 12, 2023
37a014b
Agent update refactor supports GA versioning (#2810)
nagworld9 Jun 14, 2023
d34fe4e
Add test for FIPS (#2842)
narrieta Jun 14, 2023
f86c003
Eliminate duplicate list of test suites to run (#2844)
narrieta Jun 14, 2023
01bc320
Port NSBSD system to the latest version of waagent (#2828)
sebastienb-stormshield Jun 15, 2023
42e084d
Fix method name in update test (#2845)
narrieta Jun 15, 2023
b0a12e6
Expose run name as a runbook variable (#2846)
narrieta Jun 15, 2023
8ddadf8
Collect test artifacts as a separate step in the test pipeline (#2848)
narrieta Jun 19, 2023
2acdf7f
remove agent update test and py27 version from build (#2853)
nagworld9 Jun 20, 2023
8c67210
Fix infinite retry loop in end to end tests (#2855)
narrieta Jun 21, 2023
e7d6628
Remove empty "distro" module (#2854)
narrieta Jun 21, 2023
33493d0
Enable Python 2.7 for unit tests (#2856)
narrieta Jun 21, 2023
9d90a2d
Skip downgrade if requested version below daemon version (#2850)
nagworld9 Jun 21, 2023
5132276
update location schema and added skip clouds in suite yml (#2852)
nagworld9 Jun 24, 2023
b490692
Do not collect LISA logs by default (#2857)
narrieta Jun 27, 2023
faebcdb
Add check for noexec on Permission denied errors (#2859)
narrieta Jun 28, 2023
8bd6363
Wait for log message in AgentNotProvisioned test (#2861)
narrieta Jun 29, 2023
077f66d
Always collect logs on end-to-end tests (#2863)
narrieta Jun 30, 2023
2ddd736
agent publish scenario (#2847)
nagworld9 Jun 30, 2023
6a32b50
add time window for agent manifest download (#2860)
nagworld9 Jun 30, 2023
0e1b9f5
ignore 75-persistent-net-generator.rules in e2e tests (#2862)
nagworld9 Jun 30, 2023
a168e25
Always publish artifacts and test results (#2865)
narrieta Jul 5, 2023
307e880
Add tests for extension workflow (#2843)
maddieford Jul 6, 2023
6f2a5ab
Update agent_ext_workflow.yml to skip China and Gov clouds (#2872)
maddieford Jul 10, 2023
2a761ec
fix daemon version (#2874)
nagworld9 Jul 11, 2023
eb67957
Wait for extension goal state processing before checking for lag in l…
maddieford Jul 11, 2023
6862673
Extract tarball with xvf during setup (#2880)
maddieford Jul 18, 2023
7bff7b7
enable agent update in daily run (#2878)
nagworld9 Jul 18, 2023
5dec992
Create Network Security Group for test VMs (#2882)
narrieta Jul 25, 2023
bde5b40
don't allow downgrades for self-update (#2881)
nagworld9 Jul 27, 2023
0ce136b
Supress telemetry failures from check agent log (#2887)
narrieta Jul 27, 2023
b837c30
Install assertpy on test VMs (#2886)
narrieta Jul 27, 2023
09ffc8f
Add sample remote tests (#2888)
narrieta Jul 28, 2023
0e99ee1
Enable Extensions.Enabled in tests (#2892)
nagworld9 Aug 8, 2023
4a1d3de
Reorganize file structure of unit tests (#2894)
narrieta Aug 11, 2023
57e7430
Report useful message when extension processing is disabled (#2895)
maddieford Aug 14, 2023
a1fb057
Retry tar operations after 'Unexpected EOF in archive' during node se…
maddieford Aug 15, 2023
fd2a181
Add log and telemetry event for extension disabled (#2897)
maddieford Aug 16, 2023
98f3ac4
Agent status scenario (#2875)
maddieford Aug 21, 2023
14f6124
multi config scenario (#2898)
maddieford Aug 21, 2023
a2977b8
agent and ext cgroups scenario (#2866)
nagworld9 Aug 22, 2023
d8b3c3b
agent firewall scenario (#2879)
nagworld9 Aug 22, 2023
fa0e2cf
Add retry and improve the log messages in agent update test (#2890)
nagworld9 Aug 22, 2023
3459215
Cleanup common directory (#2902)
narrieta Aug 22, 2023
51d0ba5
improved logging (#2893)
nagworld9 Aug 23, 2023
b138dfe
skip test in mooncake and usgov (#2904)
nagworld9 Aug 23, 2023
e86f1a5
extension telemetry pipeline scenario (#2901)
maddieford Aug 28, 2023
ae01d59
Ignore logcollector fetch failure if it recovers (#2906)
maddieford Aug 29, 2023
4a28ace
download_fail unit test should use agent version in common instead of…
maddieford Sep 1, 2023
bfeb170
Download certs on FT GS after check_certificates only when missing fr…
maddieford Sep 1, 2023
601954a
Update pipeline.yml to increase timeout to 90 minutes (#2910)
maddieford Sep 1, 2023
7df5506
Fix agent memory usage check (#2903)
nagworld9 Sep 7, 2023
087e926
disable ga versioning changes (#2917)
nagworld9 Sep 8, 2023
0fc8b46
fix the ignore rule in agent update test (#2915) (#2918)
nagworld9 Sep 8, 2023
ef2a7e8
Use Mariner 2 in FIPS test (#2916)
narrieta Sep 8, 2023
0a159d6
Change pipeline timeout to 90 minutes (#2925)
maddieford Sep 14, 2023
2bbb57a
fix version checking (#2920)
arsdragonfly Sep 18, 2023
19b970b
mariner container image (#2926)
nagworld9 Sep 20, 2023
c5181c0
Fix for "local variable _COLLECT_NOEXEC_ERRORS referenced before assi…
narrieta Oct 2, 2023
791b8db
fix agent manifest call frequency (#2923) (#2932)
nagworld9 Oct 3, 2023
ffa99ed
enable rhel/centos cgroups (#2922)
nagworld9 Oct 3, 2023
8bfad4d
Add support for EC certificates (#2936)
narrieta Oct 5, 2023
6dd91e5
Add Cpu Arch in local logs and telemetry events (#2938)
maddieford Oct 8, 2023
5bad0b4
skip cgorup monitor (#2939)
nagworld9 Oct 9, 2023
6e0e3f1
Clarify support status of installing from source. (#2941)
narrieta Oct 9, 2023
47ea3b3
agent cpu quota scenario (#2937)
nagworld9 Oct 20, 2023
c323eb4
skip test version install (#2950)
nagworld9 Oct 23, 2023
d638a3d
Add support for VM Scale Sets to end-to-end tests (#2954)
narrieta Oct 27, 2023
9dbceca
Ignore dependencies when the extension does not have any settings (#2…
narrieta Oct 30, 2023
22e9dfe
Cache daemon version (#2942) (#2963)
nagworld9 Oct 30, 2023
cb548d2
update warning message (#2946) (#2964)
nagworld9 Oct 30, 2023
0c4fe3a
fix self-update frequency to spread over 24 hrs for regular type and …
nagworld9 Oct 31, 2023
5b04dc8
Reduce the firewall check period in agent firewall tests (#2966)
nagworld9 Oct 31, 2023
e393368
undo get daemon version change (#2951) (#2967)
nagworld9 Oct 31, 2023
dffa667
disable agent update (#2953) (#2968)
nagworld9 Oct 31, 2023
9aecd68
Change agent_cgroups to own Vm (#2972)
maddieford Nov 3, 2023
ce5b8d6
Check SSH connectivity during end-to-end tests (#2970)
narrieta Nov 3, 2023
dfc4cc8
Gathering Guest ProxyAgent Log Files (#2975)
ZhidongPeng Nov 7, 2023
a539385
Remove debug info from waagent.status.json (#2971)
narrieta Nov 7, 2023
5542f84
Extension sequencing scenario (#2969)
maddieford Nov 7, 2023
9324a89
rename log file for agent publish scenario (#2956)
nagworld9 Nov 8, 2023
8f3ee96
Fix name collisions on resource groups created by AgentTestSuite (#2981)
narrieta Nov 8, 2023
d10cdff
Save goal state history explicitly (#2977)
narrieta Nov 8, 2023
5840594
Handle errors when adding logs to the archive (#2982)
narrieta Nov 10, 2023
5ea6b35
Timing issue while checking cpu quota (#2976)
nagworld9 Nov 13, 2023
029fdb1
Use case-insentive match when cleaning up test resource groups (#2986)
narrieta Nov 16, 2023
ce17d9b
Update supported Ubuntu versions (#2980)
CalvoM Nov 20, 2023
da32899
Fix pylint warning (#2988)
narrieta Nov 20, 2023
a335d52
Add information about HTTP proxies (#2985)
narrieta Nov 20, 2023
5a41542
agent persist firewall scenario (#2983)
nagworld9 Nov 22, 2023
56543ed
GA versioning refactor plus fetch new rsm properties. (#2974)
nagworld9 Dec 14, 2023
2848dad
Run remote date command to get test case start time (#2993)
maddieford Dec 20, 2023
e74677b
ext_sequencing scenario: get enable time from extension status files …
maddieford Dec 22, 2023
847bb08
ssh connection retry on restarts (#3001)
nagworld9 Dec 27, 2023
284fbd5
Add e2e test scenario for hostname monitoring (#3003)
maddieford Dec 29, 2023
5dcb2e1
AMA is not supported on cbl-mariner 1.0 (#3002)
maddieford Dec 29, 2023
0c03cb1
log update time for self updater (#3004)
nagworld9 Jan 2, 2024
6b70af5
Fix publish hostname in china and gov clouds (#3005)
maddieford Jan 2, 2024
bd4f12d
Self update e2e test (#3000)
nagworld9 Jan 2, 2024
c450fd8
Lisa should not cleanup failed environment if keep_environment=failed…
maddieford Jan 2, 2024
2a69855
fix(ubuntu): Point to correct dhcp lease files (#2979)
CalvoM Jan 4, 2024
860fbb4
Use self-hosted pool for automation runs (#3007)
narrieta Jan 5, 2024
ddfa35f
Add distros which use Python 2.6 (for reference only) (#3009)
narrieta Jan 5, 2024
3e8d180
Move cleanup pipeline to self-hosted pool (#3010)
narrieta Jan 5, 2024
5b9219e
NM should not be restarted during hostname publish if NM_CONTROLLED=y…
maddieford Jan 9, 2024
70e2f54
Install missing dependency (jq) on Azure Pipeline Agents (#3013)
narrieta Jan 9, 2024
5d2da88
Do not reset the mode of a extension's log directory (#3014)
narrieta Jan 10, 2024
150de9b
Daemon should remove stale published_hostname file and log useful war…
maddieford Jan 11, 2024
24b9f5a
Do not report TestFailedException in test results (#3019)
narrieta Jan 12, 2024
ddfb24e
skip agent update run on arm64 distros (#3018)
nagworld9 Jan 12, 2024
c24a9b6
Clean test VMs older than 12 hours (#3021)
narrieta Jan 12, 2024
c775702
honor rsm update with no time when agent receives new GS (#3015)
nagworld9 Jan 16, 2024
5b4166c
Don't check Agent log from the top after each test suite (#3022)
narrieta Jan 17, 2024
bf3738b
update the proxy agenet log folder for logcollector (#3028)
ZhidongPeng Jan 19, 2024
d8beb1a
Log instance view before asserting (#3029)
maddieford Jan 22, 2024
3c32d45
Add config parameter to wait for cloud-init (Extensions.WaitForCloudI…
narrieta Feb 1, 2024
cc689f5
Revert changes to publish_hostname in RedhatOSModernUtil (#3032)
maddieford Feb 2, 2024
20f0670
Remove agent_wait_for_cloud_init from automated runs (#3034)
narrieta Feb 2, 2024
4b484b8
Adding AutoUpdate.UpdateToLatestVersion new flag support (#3020)
nagworld9 Feb 5, 2024
b846a11
Retry get instance view if only name property is present (#3036)
maddieford Feb 5, 2024
25d7103
Fix regex in agent extension workflow (#3035)
maddieford Feb 5, 2024
0cd8617
Recover primary nic if down after publishing hostname in RedhatOSUtil…
maddieford Feb 5, 2024
0c7b12d
Add recover_network_interface scenario to runbook (#3037)
maddieford Feb 6, 2024
176ffbf
Implementation of new conf flag AutoUpdate.UpdateToLatestVersion supp…
nagworld9 Feb 6, 2024
2bd2dc9
Fix daily pipeline failures for recover_network_interface (#3039)
maddieford Feb 7, 2024
475c7f3
Keep failed VMs by default on pipeline runs (#3040)
maddieford Feb 7, 2024
d8565ac
enable RSM e2e tests (#3030)
nagworld9 Feb 7, 2024
e97d63b
Check for 'Access denied' errors when testing SSH connectivity (#3042)
narrieta Feb 7, 2024
8bc876d
Add Ubuntu 24 to end-to-end tests (#3041)
narrieta Feb 7, 2024
32e61e1
Skip capture of VM information on test runs (#3043)
narrieta Feb 8, 2024
694e41d
Create symlink for waagent.com on Flatcar (#3045)
narrieta Feb 8, 2024
7521421
don't allow agent update if attempts reached max limit (#3033)
nagworld9 Feb 9, 2024
4f6d984
disable RSM updates (#3044)
nagworld9 Feb 9, 2024
b498fd5
Skip test on alma and rocky until we investigate (#3047)
maddieford Feb 9, 2024
49de9b3
Ext_sequencing scenario should check agent log for extension enable o…
maddieford Feb 14, 2024
540e067
update canary region (#3056)
nagworld9 Feb 16, 2024
0163223
Add Python 3.10 to the pylint matrix (#3057)
narrieta Feb 16, 2024
43edc96
reset network service unit file if python version changes (#3058)
nagworld9 Feb 16, 2024
0aabddd
Ignore network unreachable errors in publish hostname (#3060)
maddieford Feb 20, 2024
b1b0545
Address pylint warning deprecated-method (#3059)
narrieta Feb 20, 2024
d8ebb48
fix agent update UT (#3051) (#3054)
nagworld9 Feb 21, 2024
99aca99
modify agent update flag (#3053) (#3055)
nagworld9 Feb 21, 2024
2e83971
skip run on flatcar (#3061)
nagworld9 Feb 21, 2024
f27b7b2
retry on agent cgroups tracking check (#3062)
nagworld9 Feb 22, 2024
df7be2d
Recognize SLE-Micro as a SLE based distribution (#3048)
rjschwei Feb 22, 2024
591b549
Retry ssh check if connection reset (#3065)
maddieford Feb 22, 2024
dd6be32
Add distutils/version.py to azurelinuxagent (#3063)
narrieta Feb 22, 2024
dfd912e
Run pylint on Python 3.11 (#3067)
narrieta Feb 26, 2024
edd8271
Fix pylint warnings (#3069)
narrieta Feb 27, 2024
5759501
reset uphold setting for agent service in flatcar distro (#3066)
nagworld9 Feb 27, 2024
5af6621
retry on quota reset check (#3068)
nagworld9 Feb 27, 2024
6de4652
Use legacycrypt instead of crypt on Python >= 3.13 (#3070)
narrieta Feb 27, 2024
8e02671
Skip network unreachable error in publish hostname test (#3071)
narrieta Feb 28, 2024
cc6c5ef
Fix osutil/default route_add to pass string array. (#3072)
narrieta Feb 28, 2024
8ac7e66
Fix argument to GoalState.__init__ (#3073)
narrieta Feb 29, 2024
6697ea8
Ignore network unreachable error in hostname test (#3074)
narrieta Feb 29, 2024
dd6c465
Add lock around access to fast_track.json (#3076)
narrieta Mar 1, 2024
cc94d46
added retries for agent cgroups test (#3075)
nagworld9 Mar 1, 2024
f947dde
cron job script (#3077)
nagworld9 Mar 6, 2024
68b77af
Fix mock for cgroup unit test (#3079)
narrieta Mar 6, 2024
3e4fb9a
Add DistroVersion class to compare distro versions (#3078)
narrieta Mar 6, 2024
2c5f139
enable GA versioning (#3082)
nagworld9 Mar 6, 2024
d79ab7f
Run unit tests with pytest on Python >= 3.10 (#3081)
narrieta Mar 7, 2024
c96a7f4
Fix pytest warnings (#3084)
narrieta Mar 7, 2024
3b2c905
update setup (#3088)
nagworld9 Mar 8, 2024
e72f9e8
Add keyvault test to daily run + Specify tests suite as a list (#3089)
narrieta Mar 11, 2024
ee6eb7d
ignore case (#3093)
nagworld9 Mar 14, 2024
5d40813
Add retry on keyvault test (#3095)
narrieta Mar 18, 2024
d985803
Reboot Vm if CSE timesout so logs are collected (#3097)
maddieford Mar 19, 2024
af77271
LogCollector should skip and log warning for files that don't exist (…
maddieford Mar 21, 2024
c125edc
wait for provision to complete before install test agent (#3094)
nagworld9 Mar 21, 2024
101cc1e
agent publish refactor (#3091)
nagworld9 Mar 28, 2024
b7cad48
Add EnableFirewall to README (#3100)
narrieta Mar 28, 2024
3f49315
Add Ubuntu minimal to test run (#3102)
narrieta Mar 28, 2024
782a165
check for unexpected process in agent cgroups before cgroups enabled …
nagworld9 Apr 4, 2024
f84cde2
Cgroups api refactor for v2 (#3096)
maddieford Apr 5, 2024
eb42b8f
Increase timeout for agent to start and provisioning to complete (#3105)
maddieford Apr 8, 2024
5373e9d
Keep whole goal state in log (#3104)
maddieford Apr 8, 2024
add195c
Log cgroup if process found in unexpected slice (#3107)
maddieford Apr 9, 2024
b986425
Allow retries for ifdown and add comments (#3106)
maddieford Apr 10, 2024
569e997
Collect telemetry for firewall settings changed (#3110) (#3112)
narrieta Apr 26, 2024
7adb8d4
Update agent_publish test to check for new agent update pattern (#311…
maddieford May 6, 2024
6e5cde0
remove secret and use cert for aad app in e2e pipeline (#3116)
nagworld9 May 7, 2024
eb503d4
wait for rg creation in e2e tests (#3117)
nagworld9 May 7, 2024
25475d4
Reduce the frequency of firewall telemetry (#3124) (#3127)
narrieta May 10, 2024
f47718e
suppress pylint warn contextmanager-generator-missing-cleanup (#3138)
nagworld9 Jun 7, 2024
81140ee
Switching to SNI based authentication for aad app (#3137)
nagworld9 Jun 10, 2024
49d3ce3
new namespace (#3139)
nagworld9 Jun 10, 2024
d655c29
support dict/list resources type for lisa template (#3140)
nagworld9 Jun 10, 2024
cc6501d
eFix multi config (#16) (#3145)
maddieford Jun 15, 2024
610e12b
refactor cgroup controllers (#3135)
maddieford Jun 16, 2024
e871f22
updated PR template (#3144)
nagworld9 Jun 17, 2024
bf45d50
fixing custom image test run (#3147)
nagworld9 Jun 19, 2024
5b98f1d
Avoiding mocked exception from being lost on test (#3149)
mirespace Jun 20, 2024
4dd6946
Add more useful logging for agent unit properties (#3154)
maddieford Jun 25, 2024
8f6f7fb
Remove wireserver fallback for imds calls (#3152)
narrieta Jun 26, 2024
b4291a3
Remove unused import (#3155)
narrieta Jun 26, 2024
15aa419
Expand support for backend ethernet (#3150)
Anam9 Jul 3, 2024
feb6edb
Allow use of node 16 (#3160)
narrieta Jul 16, 2024
a97c637
Fix Ubuntu version codename for 24.04 (#3159)
mirespace Jul 16, 2024
23d4c5b
Fix regex pattern for ext seq scenario (#3162)
maddieford Jul 16, 2024
93ee726
Update test certificate data (#3166)
narrieta Aug 2, 2024
818ec09
Remove extension status only on extension delete (#3167)
narrieta Aug 12, 2024
1a0f1b5
Add support for Azure Linux 3 (#3183)
narrieta Aug 15, 2024
4412778
Use self-update for initial update (#3184)
nagworld9 Aug 23, 2024
67cd6e1
send updatemode in heartbeat and don't send RSM supported feature fla…
nagworld9 Aug 23, 2024
fc7644a
Disable multi-config test in AzureCloud (#3192)
narrieta Aug 26, 2024
0681f14
Add cgroupv2 support for log collector (#3188)
maddieford Aug 26, 2024
ef87f40
workaround for python3.5 UTs build setup and replace assert_called_on…
nagworld9 Aug 26, 2024
76da663
Fix log collector unit tests on 3.5 (#3193)
maddieford Aug 26, 2024
8dbb016
Fix JIT for FIPS 140-3 (#3190)
narrieta Aug 26, 2024
04490fb
Capture logcollector pattern only once (#3194)
maddieford Aug 27, 2024
730510e
Check agent Slice unit property before setting up azure.slice (#3196)…
maddieford Aug 28, 2024
3195fdc
version update to 2.12.0.0 (#3195)
nagworld9 Sep 3, 2024
83213bc
fixing attribute error (#3202)
nagworld9 Sep 3, 2024
8fb3982
version update to 2.12.0.1" (#3203)
nagworld9 Sep 3, 2024
6e849db
supress too-many-positional-args pylint warn (#3224) (#3225)
nagworld9 Sep 20, 2024
f09ccd1
move setupslice after cgroupsv2 check, remove unit file for log colle…
nagworld9 Sep 20, 2024
c1bc004
Ubuntu 24 image (#25) (#3229) (#3230)
maddieford Sep 23, 2024
9d639a3
Add controller/cgroup path telemetry (#3231)
maddieford Sep 23, 2024
f9ce539
version update to 2.12.0.2 (#3233)
nagworld9 Sep 23, 2024
b79ceb8
merge(conflicts) master to release-2.12.0.0
nagworld9 Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This will expedite the process of getting your pull request merged and avoid ext
---

### PR information
- [ ] Ensure development PR is based on the `develop` branch.
- [ ] The title of the PR is clear and informative.
- [ ] There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).
- [ ] If applicable, the PR references the bug/issue that it fixes in the description.
Expand Down
90 changes: 63 additions & 27 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ on:

jobs:
test-python-2_6-and-3_4-versions:

strategy:
fail-fast: false
matrix:
include:
- python-version: 2.6
- python-version: 3.4
- python-version: "2.6"
- python-version: "3.4"

name: "Python ${{ matrix.python-version }} Unit Tests"
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Test with nosetests
run: |
if [[ ${{ matrix.python-version }} == 2.6 ]]; then
if [[ ${{ matrix.python-version }} == "2.6" ]]; then
source /home/waagent/virtualenv/python2.6.9/bin/activate
else
source /home/waagent/virtualenv/python3.4.8/bin/activate
Expand Down Expand Up @@ -87,30 +87,23 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: 3.5
PYLINTOPTS: "--rcfile=ci/3.6.pylintrc --ignore=tests_e2e,makepkg.py"

- python-version: 3.6
PYLINTOPTS: "--rcfile=ci/3.6.pylintrc --ignore=tests_e2e"

- python-version: 3.7
PYLINTOPTS: "--rcfile=ci/3.6.pylintrc --ignore=tests_e2e"

- python-version: 3.8
PYLINTOPTS: "--rcfile=ci/3.6.pylintrc --ignore=tests_e2e"

- python-version: 3.9
PYLINTOPTS: "--rcfile=ci/3.6.pylintrc"
- python-version: "3.5"
# workaround found in https://github.com/actions/setup-python/issues/866
# for issue "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:728)" on Python 3.5
pip_trusted_host: "pypi.python.org pypi.org files.pythonhosted.org"
- python-version: "3.6"
- python-version: "3.7"
- python-version: "3.8"
- python-version: "3.9"
additional-nose-opts: "--with-coverage --cover-erase --cover-inclusive --cover-branches --cover-package=azurelinuxagent"
- python-version: "3.10"
- python-version: "3.11"

name: "Python ${{ matrix.python-version }} Unit Tests"
runs-on: ubuntu-20.04

env:
PYLINTOPTS: ${{ matrix.PYLINTOPTS }}
PYLINTFILES: "azurelinuxagent setup.py makepkg.py tests tests_e2e"
NOSEOPTS: "--with-timer ${{ matrix.additional-nose-opts }}"
PYTHON_VERSION: ${{ matrix.python-version }}

steps:

Expand All @@ -121,26 +114,69 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
env:
PIP_TRUSTED_HOST: ${{ matrix.pip_trusted_host }}

- name: Install dependencies
id: install-dependencies
run: |
sudo env "PATH=$PATH" python -m pip install --upgrade pip
sudo env "PATH=$PATH" pip install -r requirements.txt
sudo env "PATH=$PATH" pip install -r test-requirements.txt
sudo env "PATH=$PATH" pip install --upgrade pylint

- name: Run pylint
run: |
pylint $PYLINTOPTS --jobs=0 $PYLINTFILES
#
# List of files/directories to be checked by pylint.
# The end-to-end tests run only on Python 3.9 and we lint them only on that version.
#
PYLINT_FILES="azurelinuxagent setup.py makepkg.py tests"
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
PYLINT_FILES="$PYLINT_FILES tests_e2e"
fi

- name: Test with nosetests
#
# Command-line options for pylint.
# * "unused-private-member" is not implemented on 3.5 and will produce "E0012: Bad option value 'unused-private-member' (bad-option-value)"
# so we suppress "bad-option-value".
# * 3.9 will produce "no-member" for several properties/methods that are added to the mocks used by the unit tests (e.g
# "E1101: Instance of 'WireProtocol' has no 'aggregate_status' member") so we suppress that warning.
# * On 3.9 pylint crashes when parsing azurelinuxagent/daemon/main.py (see https://github.com/pylint-dev/pylint/issues/9473), so we ignore it.
# * 'no-self-use' ("R0201: Method could be a function") was moved to an optional extension on 3.8 and is no longer used by default. It needs
# to be suppressed for previous versions (3.0-3.7), though.
# * 'contextmanager-generator-missing-cleanup' are false positives if yield is used inside an if-else block for contextmanager generator functions.
# (https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/contextmanager-generator-missing-cleanup.html).
# This is not implemented on versions (3.0-3.7) Bad option value 'contextmanager-generator-missing-cleanup' (bad-option-value)
# * 3.9-3.11 will produce "too-many-positional-arguments" for several methods that are having more than 5 args, so we suppress that warning.
# (R0917: Too many positional arguments (8/5) (too-many-positional-arguments))
PYLINT_OPTIONS="--rcfile=ci/pylintrc --jobs=0"
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
PYLINT_OPTIONS="$PYLINT_OPTIONS --disable=no-member,too-many-positional-arguments --ignore=main.py"
fi
if [[ "${{ matrix.python-version }}" =~ ^3\.(10|11)$ ]]; then
PYLINT_OPTIONS="$PYLINT_OPTIONS --disable=too-many-positional-arguments"
fi
if [[ "${{ matrix.python-version }}" =~ ^3\.[0-7]$ ]]; then
PYLINT_OPTIONS="$PYLINT_OPTIONS --disable=no-self-use,bad-option-value"
fi

echo "PYLINT_OPTIONS: $PYLINT_OPTIONS"
echo "PYLINT_FILES: $PYLINT_FILES"

pylint $PYLINT_OPTIONS $PYLINT_FILES

- name: Execute Unit Tests
if: success() || (failure() && steps.install-dependencies.outcome == 'success')
run: |
./ci/nosetests.sh
exit $?
if [[ "${{ matrix.python-version }}" =~ ^3\.[1-9][0-9]+$ ]]; then
./ci/pytest.sh
else
./ci/nosetests.sh
fi

- name: Compile Coverage
if: matrix.python-version == 3.9
if: matrix.python-version == '3.9'
run: |
echo looking for coverage files :
ls -alh | grep -i coverage
Expand All @@ -149,7 +185,7 @@ jobs:
sudo env "PATH=$PATH" coverage report

- name: Upload Coverage
if: matrix.python-version == 3.9
if: matrix.python-version == '3.9'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Waagent depends on some system packages in order to function properly:
* Filesystem utilities: sfdisk, fdisk, mkfs, parted
* Password tools: chpasswd, sudo
* Text processing tools: sed, grep
* Network tools: ip-route
* Network tools: ip-route, iptables

## Installation

Expand Down Expand Up @@ -568,6 +568,13 @@ OpenSSL commands. This signals OpenSSL to use any installed FIPS-compliant libra
Note that the agent itself has no FIPS-specific code. _If no FIPS-compliant certificates are
installed, then enabling this option will cause all OpenSSL commands to fail._

#### __OS.EnableFirewall__

_Type: Boolean_
_Default: n (set to 'y' in waagent.conf)_

Creates firewall rules to allow communication with the VM Host only by the Agent.

#### __OS.MonitorDhcpClientRestartPeriod__

_Type: Integer_
Expand Down
75 changes: 47 additions & 28 deletions azurelinuxagent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@

from __future__ import print_function

import json
import os
import re
import subprocess
import sys
import threading

from azurelinuxagent.common.exception import CGroupsException
from azurelinuxagent.ga import logcollector, cgroupconfigurator
from azurelinuxagent.ga.cgroup import AGENT_LOG_COLLECTOR, CpuCgroup, MemoryCgroup
from azurelinuxagent.ga.cgroupapi import SystemdCgroupsApi
from azurelinuxagent.ga.cgroupcontroller import AGENT_LOG_COLLECTOR
from azurelinuxagent.ga.cpucontroller import _CpuController
from azurelinuxagent.ga.cgroupapi import get_cgroup_api, log_cgroup_warning, InvalidCgroupMountpointException

import azurelinuxagent.common.conf as conf
import azurelinuxagent.common.event as event
Expand Down Expand Up @@ -131,7 +135,7 @@ def daemon(self):
"""
set_daemon_version(AGENT_VERSION)
logger.set_prefix("Daemon")
threading.current_thread().setName("Daemon")
threading.current_thread().name = "Daemon"
child_args = None \
if self.conf_file_path is None \
else "-configuration-path:{0}".format(self.conf_file_path)
Expand Down Expand Up @@ -171,7 +175,7 @@ def run_exthandlers(self, debug=False):
Run the update and extension handler
"""
logger.set_prefix("ExtHandler")
threading.current_thread().setName("ExtHandler")
threading.current_thread().name = "ExtHandler"

#
# Agents < 2.2.53 used to echo the log to the console. Since the extension handler could have been started by
Expand Down Expand Up @@ -206,42 +210,57 @@ def collect_logs(self, is_full_mode):

# Check the cgroups unit
log_collector_monitor = None
cgroups_api = SystemdCgroupsApi()
cpu_cgroup_path, memory_cgroup_path = cgroups_api.get_process_cgroup_paths("self")
tracked_controllers = []
if CollectLogsHandler.is_enabled_monitor_cgroups_check():
cpu_slice_matches = (cgroupconfigurator.LOGCOLLECTOR_SLICE in cpu_cgroup_path)
memory_slice_matches = (cgroupconfigurator.LOGCOLLECTOR_SLICE in memory_cgroup_path)
try:
cgroup_api = get_cgroup_api()
except InvalidCgroupMountpointException as e:
log_cgroup_warning("The agent does not support cgroups if the default systemd mountpoint is not being used: {0}".format(ustr(e)), send_event=True)
sys.exit(logcollector.INVALID_CGROUPS_ERRCODE)
except CGroupsException as e:
log_cgroup_warning("Unable to determine which cgroup version to use: {0}".format(ustr(e)), send_event=True)
sys.exit(logcollector.INVALID_CGROUPS_ERRCODE)

if not cpu_slice_matches or not memory_slice_matches:
logger.info("The Log Collector process is not in the proper cgroups:")
if not cpu_slice_matches:
logger.info("\tunexpected cpu slice")
if not memory_slice_matches:
logger.info("\tunexpected memory slice")
log_collector_cgroup = cgroup_api.get_process_cgroup(process_id="self", cgroup_name=AGENT_LOG_COLLECTOR)
tracked_controllers = log_collector_cgroup.get_controllers()

if len(tracked_controllers) != len(log_collector_cgroup.get_supported_controller_names()):
log_cgroup_warning("At least one required controller is missing. The following controllers are required for the log collector to run: {0}".format(log_collector_cgroup.get_supported_controller_names()))
sys.exit(logcollector.INVALID_CGROUPS_ERRCODE)

def initialize_cgroups_tracking(cpu_cgroup_path, memory_cgroup_path):
cpu_cgroup = CpuCgroup(AGENT_LOG_COLLECTOR, cpu_cgroup_path)
msg = "Started tracking cpu cgroup {0}".format(cpu_cgroup)
logger.info(msg)
cpu_cgroup.initialize_cpu_usage()
memory_cgroup = MemoryCgroup(AGENT_LOG_COLLECTOR, memory_cgroup_path)
msg = "Started tracking memory cgroup {0}".format(memory_cgroup)
logger.info(msg)
return [cpu_cgroup, memory_cgroup]
if not log_collector_cgroup.check_in_expected_slice(cgroupconfigurator.LOGCOLLECTOR_SLICE):
log_cgroup_warning("The Log Collector process is not in the proper cgroups", send_event=False)
sys.exit(logcollector.INVALID_CGROUPS_ERRCODE)

try:
log_collector = LogCollector(is_full_mode)
# Running log collector resource(CPU, Memory) monitoring only if agent starts the log collector.
# Running log collector resource monitoring only if agent starts the log collector.
# If Log collector start by any other means, then it will not be monitored.
if CollectLogsHandler.is_enabled_monitor_cgroups_check():
tracked_cgroups = initialize_cgroups_tracking(cpu_cgroup_path, memory_cgroup_path)
log_collector_monitor = get_log_collector_monitor_handler(tracked_cgroups)
for controller in tracked_controllers:
if isinstance(controller, _CpuController):
controller.initialize_cpu_usage()
break
log_collector_monitor = get_log_collector_monitor_handler(tracked_controllers)
log_collector_monitor.run()
archive = log_collector.collect_logs_and_get_archive()

archive, total_uncompressed_size = log_collector.collect_logs_and_get_archive()
logger.info("Log collection successfully completed. Archive can be found at {0} "
"and detailed log output can be found at {1}".format(archive, OUTPUT_RESULTS_FILE_PATH))

if log_collector_monitor is not None:
log_collector_monitor.stop()
try:
metrics_summary = log_collector_monitor.get_max_recorded_metrics()
metrics_summary['Total Uncompressed File Size (B)'] = total_uncompressed_size
msg = json.dumps(metrics_summary)
logger.info(msg)
event.add_event(op=event.WALAEventOperation.LogCollection, message=msg, log_event=False)
except Exception as e:
msg = "An error occurred while reporting log collector resource usage summary: {0}".format(ustr(e))
logger.warn(msg)
event.add_event(op=event.WALAEventOperation.LogCollection, is_success=False, message=msg, log_event=False)

except Exception as e:
logger.error("Log collection completed unsuccessfully. Error: {0}".format(ustr(e)))
logger.info("Detailed log output can be found at {0}".format(OUTPUT_RESULTS_FILE_PATH))
Expand Down Expand Up @@ -328,7 +347,7 @@ def parse_args(sys_args):
if arg == "":
# Don't parse an empty parameter
continue
m = re.match("^(?:[-/]*)configuration-path:([\w/\.\-_]+)", arg) # pylint: disable=W1401
m = re.match(r"^(?:[-/]*)configuration-path:([\w/\.\-_]+)", arg)
if not m is None:
conf_file_path = m.group(1)
if not os.path.exists(conf_file_path):
Expand Down
5 changes: 3 additions & 2 deletions azurelinuxagent/common/agent_supported_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ def __init__(self):
class _GAVersioningGovernanceFeature(AgentSupportedFeature):
"""
CRP would drive the RSM update if agent reports that it does support RSM upgrades with this flag otherwise CRP fallback to largest version.
Agent doesn't report supported feature flag if auto update is disabled or old version of agent running that doesn't understand GA versioning.
Agent doesn't report supported feature flag if auto update is disabled or old version of agent running that doesn't understand GA versioning
or if explicitly support for versioning is disabled in agent

Note: Especially Windows need this flag to report to CRP that GA doesn't support the updates. So linux adopted same flag to have a common solution.
"""

__NAME = SupportedFeatureNames.GAVersioningGovernance
__VERSION = "1.0"
__SUPPORTED = conf.get_auto_update_to_latest_version()
__SUPPORTED = conf.get_auto_update_to_latest_version() and conf.get_enable_ga_versioning()

def __init__(self):
super(_GAVersioningGovernanceFeature, self).__init__(name=self.__NAME,
Expand Down
27 changes: 23 additions & 4 deletions azurelinuxagent/common/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ConfigurationProvider(object):
"""

def __init__(self):
self.values = dict()
self.values = {}

def load(self, content):
if not content:
Expand Down Expand Up @@ -146,7 +146,8 @@ def load_conf_from_file(conf_file_path, conf=__conf__):
"Debug.CgroupDisableOnQuotaCheckFailure": True,
"Debug.EnableAgentMemoryUsageCheck": False,
"Debug.EnableFastTrack": True,
"Debug.EnableGAVersioning": True
"Debug.EnableGAVersioning": True,
"Debug.EnableCgroupV2ResourceLimiting": False
}


Expand Down Expand Up @@ -200,7 +201,8 @@ def load_conf_from_file(conf_file_path, conf=__conf__):
"Debug.EtpCollectionPeriod": 300,
"Debug.AutoUpdateHotfixFrequency": 14400,
"Debug.AutoUpdateNormalFrequency": 86400,
"Debug.FirewallRulesLogPeriod": 86400
"Debug.FirewallRulesLogPeriod": 86400,
"Debug.LogCollectorInitialDelay": 5 * 60
}


Expand Down Expand Up @@ -670,7 +672,7 @@ def get_enable_ga_versioning(conf=__conf__):
If True, the agent looks for rsm updates(checking requested version in GS) otherwise it will fall back to self-update and finds the highest version from PIR.
NOTE: This option is experimental and may be removed in later versions of the Agent.
"""
return conf.get_switch("Debug.EnableGAVersioning", False)
return conf.get_switch("Debug.EnableGAVersioning", True)


def get_firewall_rules_log_period(conf=__conf__):
Expand All @@ -680,3 +682,20 @@ def get_firewall_rules_log_period(conf=__conf__):
NOTE: This option is experimental and may be removed in later versions of the Agent.
"""
return conf.get_int("Debug.FirewallRulesLogPeriod", 86400)


def get_enable_cgroup_v2_resource_limiting(conf=__conf__):
"""
If True, the agent will enable resource monitoring and enforcement for the log collector on machines using cgroup v2.
NOTE: This option is experimental and may be removed in later versions of the Agent.
"""
return conf.get_switch("Debug.EnableCgroupV2ResourceLimiting", False)


def get_log_collector_initial_delay(conf=__conf__):
"""
Determine the initial delay at service start before the first periodic log collection.
NOTE: This option is experimental and may be removed in later versions of the Agent.
"""
return conf.get_int("Debug.LogCollectorInitialDelay", 5 * 60)
Loading
Loading