-
Notifications
You must be signed in to change notification settings - Fork 372
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
Add mariner 1.0 to DCR v2 #2517
Changes from all commits
58d385d
79cd555
2b00a1d
49d4133
9eb4e01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ def check_root_login(): | |
print(root_passwd_line) | ||
root_passwd = root_passwd_line.split(":")[1] | ||
|
||
if "!" in root_passwd or "*" in root_passwd: | ||
if any(val in root_passwd for val in ("!", "*", "x")): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mariner 1.0 uses a different syntax to mean the same thing; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need this test at all? what is its equivalent in DCR v1? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My first impression is that we can drop this test. Before doing so, though, could you check if the agent disables root login (maybe during provisioning)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will do |
||
return 'root login disabled' | ||
else: | ||
raise Exception('root login appears to be enabled: {0}'.format(root_passwd)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ | |
set -euxo pipefail | ||
|
||
ssh -o "StrictHostKeyChecking no" "$1"@"$2" "sudo tar --exclude='journal/*' --exclude='omsbundle' --exclude='omsagent' --exclude='mdsd' --exclude='scx*' --exclude='*.so' --exclude='*__LinuxDiagnostic__*' --exclude='*.zip' --exclude='*.deb' --exclude='*.rpm' -czf logs-$2.tgz /var/log /var/lib/waagent/ /etc/waagent.conf" | ||
# Some distros do not have "other" permissions (e.g., mariner1.0), so change the | ||
# owning user so we can grab them below (during the scp command). | ||
ssh -o "StrictHostKeyChecking no" "$1"@"$2" "sudo chown $1 logs-$2.tgz" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment on previous line needs updating There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch! |
||
|
||
# Create directory if doesn't exist | ||
mkdir -p "$3" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,7 +234,8 @@ | |
"createOption": "FromImage", | ||
"managedDisk": { | ||
"storageAccountType": "[variables('osDiskType')]" | ||
} | ||
}, | ||
"diskSizeGB": 32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mariner 1.0 specifies a minimum OS disk as 1GB, which causes our testing to crash with "no space left on disk" if we leave this property blank. This approach does lock in all other distros to the same size; i.e., I believe ubuntu lets you create an 16GB OS disk, so we'd be doubling that size with this. 32GB is the largest minimum of the distros we test, so I went with that. |
||
}, | ||
"imageReference": { | ||
"publisher": "[parameters('imagePublisher')]", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As seen with mariner 1.0, when there is no entry in the config file, the agent disables the firewall.