Merge lp:~ltrager/maas/lp1554636 into lp:maas/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Lee Trager on 2016-11-02 | ||||
Approved revision: | 5518 | ||||
Merged at revision: | 5528 | ||||
Proposed branch: | lp:~ltrager/maas/lp1554636 | ||||
Merge into: | lp:maas/trunk | ||||
Diff against target: |
243 lines (+167/-5) 2 files modified
src/provisioningserver/import_images/boot_resources.py (+13/-4) src/provisioningserver/import_images/tests/test_boot_resources.py (+154/-1) |
||||
To merge this branch: | bzr merge lp:~ltrager/maas/lp1554636 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | 2016-10-26 | Approve on 2016-10-31 | |
Review via email:
|
Commit message
Update iSCSI targets on every import (in case last time failed to update).
Description of the change
In LP:1554636 MAAS was serving old images because when the image was updated the TGT target to be replaced was removed. Since the target was cached the old version kept getting served. This modifies import_images to reload the TGT targets every time its run(every 15 minutes). This is a stop gap until we replace TGT with downloading the image over HTTP.
Lee Trager (ltrager) wrote : | # |
MAAS has always tried to update the iSCSI targets whenever images are added, removed, or updated. It does this by using the tgt-admin --update command which compares a configuration file to what tgt is currently serving. It adds new targets, removes targets which are no longer in the config file, and reloads files which have changed. If a target is in use tgt-admin --update will not remove or update that target. When this happens the user is left using an outdated image.
What this change does is run tgt-admin --update every time the an import is run. So any target that wasn't able to be updated will be updated on the next import(happens every 15 minutes). The amount of target loads stays the same, as targets are only changed when new images actually come in. For the most part this just causes the tgt-admin to load the config and see that there is nothing to update.
Mike Pontillo (mpontillo) wrote : | # |
All right. Sounds like this is a good improvement, then. Thanks!
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~ltrager/maas/lp1554636 into lp:maas failed. Below is the output from the failed tests.
Hit:1 http://
Hit:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Fetched 544 kB in 0s (985 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
authbind is already the newest version (2.1.1+nmu1).
avahi-utils is already the newest version (0.6.32~
build-essential is already the newest version (12.1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
make is already the newest version (4.1-6).
postgresql is already the newest version (9.5+173).
pxelinux is already the newest version (3:6.03+
python-formencode is already the newest version (1.3.0-0ubuntu5).
python-lxml is already the newest version (3.5.0-1...
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~ltrager/maas/lp1554636 into lp:maas failed. Below is the output from the failed tests.
Hit:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Fetched 1,872 kB in 0s (2,770 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
authbind is already the newest version (2.1.1+nmu1).
avahi-utils is already the newest version (0.6.32~
build-essential is already the newest ver...
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~ltrager/maas/lp1554636 into lp:maas failed. Below is the output from the failed tests.
Hit:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Fetched 282 kB in 0s (618 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
authbind is already the newest version (2.1.1+nmu1).
avahi-utils is already the newest version (0.6.32~
build-essential is already the newest version (12.1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
make is already the newest version (4.1-6).
postgresql is already the newest version (9.5+173).
pxelinux is already the newest version (3:6.03+
python-formencode is already the newest version (1.3.0-0ubuntu5).
python-lxml is already the newest version (3.5.0-1build1).
python-netaddr is already the newest version (0.7.18-1).
python-netifaces is already the new...
- 5518. By Lee Trager on 2016-11-02
-
Fix lint
A couple questions:
- When many images are downloaded, is it expensive to update the targets?
- When tgt is 'reloaded', how invasive is that operation? (Are existing iSCSI connections interrupted, or do they remain open until unmounted -- at which point they become unavailable?)