sos_testing/sos_collect_testing.sh

34 lines
717 B
Bash
Raw Normal View History

2023-10-30 20:04:25 +00:00
#!/bin/bash
series="lunar"
model="${series}-sos"
cat > juju-model-sos.yaml << EOF
cloudinit-userdata: |
package_update: true
package_upgrade: true
apt:
sources:
proposed:
source: deb \$MIRROR \$RELEASE-proposed restricted main multiverse universe
packages:
- sosreport
postruncmd:
- [ 'apt', 'install', '-y', 'sosreport/\$RELEASE-proposed' ]
EOF
juju add-model ${model}
juju model-config ./juju-model-sos.yaml
juju deploy ubuntu --series ${series} -n 5 --force
juju-wait -v -e ${model}
# wait for package to finish install
sleep 5
juju run --all -- dpkg -l sosreport
sos collect --cluster-type juju --no-local -c "juju.apps=ubuntu" --batch --case-id 3524678 --all-logs -a