Skip to content

Commit

Permalink
packer/scylla.json: Add apt-get update after kernel package removal
Browse files Browse the repository at this point in the history
From time to time we get the following error during Azure build:
```
�[0;32m    azure: Reading state information...�[0m
 �[1;31m==> azure: E: Unable to locate package linux-azure-lts-22.04�[0m
 �[1;31m==> azure: E: Couldn't find any package by glob 'linux-azure-lts-22.04'�[0m
 �[1;31m==> azure: E: Couldn't find any package by regex 'linux-azure-lts-22.04'�[0m
 �[1;32m==> azure: Provisioning step had errors: Running the cleanup provisioner, if present...�[0m
 �[1;32m==> azure:
 ==> azure: Deleting individual resources ...�[0m
```

Couldn't find a main reason for this, as it can't be repreduced all
time.

As suggested by @mykaul, adding `apt-get update` after kernel package
pruge command

Fixes: scylladb/scylla-pkg#3601
  • Loading branch information
yaronkaikov committed Dec 13, 2023
1 parent 2e7ab63 commit 2df73bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packer/scylla.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
{
"type": "shell",
"inline": [
"if [ {{build_name}} = aws -o {{build_name}} = azure ]; then sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt purge -y linux-{{build_name}}* linux-headers-{{build_name}}* linux-image*{{build_name}}* linux-modules*-{{build_name}}* && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y linux-{{build_name}}-lts-22.04 && sudo reboot; fi"
"if [ {{build_name}} = aws -o {{build_name}} = azure ]; then sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt purge -y linux-{{build_name}}* linux-headers-{{build_name}}* linux-image*{{build_name}}* linux-modules*-{{build_name}}* && sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y linux-{{build_name}}-lts-22.04 && sudo reboot; fi"
],
"expect_disconnect": true
},
Expand Down

0 comments on commit 2df73bb

Please sign in to comment.