Merge lp:~jtv/maas/bug-1233069 into lp:~maas-committers/maas/trunk
- bug-1233069
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 1651 |
Proposed branch: | lp:~jtv/maas/bug-1233069 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
41 lines (+12/-5) 1 file modified
scripts/maas-import-pxe-files (+12/-5) |
To merge this branch: | bzr merge lp:~jtv/maas/bug-1233069 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Review via email:
|
Commit message
Make maas-import-
Description of the change
Previously I made the script a bit more tolerant about missing files, but this change makes it skip images that are not available at all. We notice this when the attempt to download its MD5 checksums fails.
There are no unit-tests for this. Not that we usually unit-test shell code, but in this case it should be possible. It's just that we're working towards replacing this script altogether. I did test it manually, in various combinations of available and unavailable release series.
Failing downloads will still break the ephemerals import script, but we're fixing that with the Python version of the script.
Jeroen
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jeroen T. Vermeulen (jtv) wrote : | # |
Should work, yes. Maybe whoever did this wanted to avoid the ordering sensitivity of “>/dev/null 2>&1” vs. “2>&1 >/dev/null”.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Hit http://
Ign http://
Ign http://
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Ign http://
Ign http://
Get:4 http://
Get:5 http://
Get:6 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 14.1 MB in 13s (1,056 kB/s)
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Ign http://
Hit http://
Ign http://
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Ign http://
Ign http://
Get:4 http://
Get:5 http://
Get:6 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 14.1 MB in 6s (2,048 kB/s)
Reading package lists...
sudo DEBIAN_
--
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Hit http://
Ign http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Hit http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Reading package lists...
sudo DEBIAN_
--
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Hit http://
Ign http://
Ign http://
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Ign http://
Ign http://
Get:4 http://
Get:5 http://
Get:6 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 14.1 MB in 7s (2,009 kB/s)
Reading package lists...
sudo DEBIAN_
--
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Hit http://
Ign http://
Ign http://
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Get:3 http://
Ign http://
Get:4 http://
Get:5 http://
Get:6 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 14.1 MB in 15s (920 kB/s)
Reading package lists...
sudo DEBIAN_
--
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Ign http://
Hit http://
Hit http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Hit http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Reading package lists...
sudo DEBIAN_
--
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Ign http://
Hit http://
Ign http://
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Ign http://
Ign http://
Get:4 http://
Get:5 http://
Get:6 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 14.1 MB in 14s (985 kB/s)
Reading package lists...
sudo DEBIAN_
--
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Hit http://
Ign http://
Ign http://
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Ign http://
Ign http://
Get:4 http://
Get:5 http://
Get:6 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 14.1 MB in 23s (599 kB/s)
Reading package lists...
sudo DEBIAN_
--
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~jtv/maas/bug-1233069 into lp:maas failed. Below is the output from the failed tests.
Ign http://
Hit http://
Hit http://
Ign http://
Ign http://
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Ign http://
Ign http://
Get:4 http://
Get:5 http://
Get:6 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 14.1 MB in 5s (2,537 kB/s)
Reading package lists...
sudo DEBIAN_
--
Preview Diff
1 | === modified file 'scripts/maas-import-pxe-files' |
2 | --- scripts/maas-import-pxe-files 2013-09-30 06:30:53 +0000 |
3 | +++ scripts/maas-import-pxe-files 2013-09-30 11:29:16 +0000 |
4 | @@ -132,25 +132,32 @@ |
5 | echo "$base_url/$postfix" |
6 | } |
7 | |
8 | +# Fetch MD5SUMS file. This returns false (i.e. nonzero) in the case of |
9 | +# survivable failure, so that the caller can skip this image and move on. |
10 | fetch_server_md5sums() { |
11 | local base_url=$1 |
12 | - local ignore |
13 | |
14 | if ! $DOWNLOAD "$base_url/MD5SUMS" |
15 | then |
16 | - fail "Unable to download $base_url/MD5SUMS" |
17 | + echo "Unable to download $base_url/MD5SUMS" >&2 |
18 | + return 1 |
19 | fi |
20 | |
21 | if [ "x$IGNORE_GPG" == "x" ] |
22 | then |
23 | if ! $DOWNLOAD "$base_url/MD5SUMS.gpg" |
24 | then |
25 | - fail "Unable to download $base_url/MD5SUMS.gpg" |
26 | + echo "Unable to download $base_url/MD5SUMS.gpg" >&2 |
27 | + return 1 |
28 | fi |
29 | |
30 | - ignore=$(gpg --keyring=$GPG_KEYRING --verify MD5SUMS.gpg MD5SUMS 2>&1) || |
31 | - fail "Failed to verify MD5SUMS via $GPG_KEYRING ($base_url/MD5SUMS)" |
32 | + if ! gpg --keyring=$GPG_KEYRING --verify MD5SUMS.gpg MD5SUMS >/dev/null 2>/dev/null |
33 | + then |
34 | + echo "Failed to verify MD5SUMS via $GPG_KEYRING ($base_url/MD5SUMS)" >&2 |
35 | + return 1 |
36 | + fi |
37 | fi |
38 | + return 0 |
39 | } |
40 | |
41 | get_md5sum_for_file() { |
Looks good!
[0]
32 + if ! ignore=$(gpg --keyring= $GPG_KEYRING --verify MD5SUMS.gpg MD5SUMS 2>&1)
You can probably get rid of the 'ignore' variable entirely, can't you?