Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit c13793d

Browse files
committed
Support version in platform image
- Override UbuntuServer 16.04-LTS latest to prior version due to linux-azure kernel issues
1 parent 01c2f89 commit c13793d

File tree

6 files changed

+30
-4
lines changed

6 files changed

+30
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
## [Unreleased]
44

5+
### Added
6+
- Optional `version` support for `platform_image`. This property can be
7+
used to set a host OS version to prevent possible issues that occur with
8+
`latest` image versions.
9+
510
### Changed
611
- Prevent invalid configuration of HPC offers with non-RDMA VM sizes
712
- Expanded network tuning exemptions for new Dv3 and Ev3 sizes
13+
- Temporarily override Canonical UbuntuServer 16.04-LTS latest version to
14+
a prior version due to recent linux-azure kernel issues.
815

916
### Fixed
1017
- NV driver updates

config_templates/pool.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"platform_image": {
66
"publisher": "Canonical",
77
"offer": "UbuntuServer",
8-
"sku": "16.04-LTS"
8+
"sku": "16.04-LTS",
9+
"version": "latest"
910
},
1011
"custom_image": {
1112
"image_uris": [

convoy/fleet.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,19 @@ def _construct_pool_object(
934934
pool_settings.vm_configuration.offer,
935935
pool_settings.vm_configuration.publisher,
936936
pool_settings.vm_configuration.sku))
937+
# set image version to use
938+
image_ref_to_use.version = pool_settings.vm_configuration.version
939+
# TODO temporarily pin Ubuntu to version 16.04.201708151 due to
940+
# Docker <-> kernel issues in the linux-azure kernel
941+
if (image_ref_to_use.publisher.lower() == 'canonical' and
942+
image_ref_to_use.offer.lower() == 'ubuntuserver' and
943+
image_ref_to_use.sku.lower() == '16.04-lts' and
944+
image_ref_to_use.version.lower() == 'latest'):
945+
image_ref_to_use.version = '16.04.201708151'
946+
logger.warning(
947+
('overriding Canonical UbuntuServer 16.04-LTS latest version '
948+
'to {}').format(image_ref_to_use.version))
949+
logger.info('deploying vm config: {}'.format(image_ref_to_use))
937950
vmconfig = batchmodels.VirtualMachineConfiguration(
938951
image_reference=image_ref_to_use,
939952
node_agent_sku_id=sku_to_use.id,

convoy/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
'publisher',
8989
'offer',
9090
'sku',
91+
'version',
9192
]
9293
)
9394
PoolVmCustomImageSettings = collections.namedtuple(
@@ -616,6 +617,7 @@ def _populate_pool_vm_configuration(config):
616617
publisher=conf['publisher'],
617618
offer=conf['offer'],
618619
sku=conf['sku'],
620+
version=_kv_read_checked(conf, 'version', default='latest'),
619621
)
620622
else:
621623
conf = pool_vm_configuration(config, 'custom_image')

docs/13-batch-shipyard-configuration-pool.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ The pool schema is as follows:
1313
"platform_image": {
1414
"publisher": "Canonical",
1515
"offer": "UbuntuServer",
16-
"sku": "16.04-LTS"
16+
"sku": "16.04-LTS",
17+
"version": "latest"
1718
},
1819
"custom_image": {
1920
"image_uris": [
@@ -123,6 +124,8 @@ specify both. If using a custom image, please see the
123124
Marketplace VM image.
124125
* (required for platform image) `sku` is the sku name of the Marketplace
125126
VM image.
127+
* (optional) `version` is the image version to use. The default is
128+
`latest`.
126129
* (required for custom image) `custom_image` defines the custom image to
127130
use:
128131
* (required for custom image) `image_uris` defines a list of page blob

scripts/shipyard_nodeprep.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ docker_pull_image() {
369369
# non-zero exit code: check if pull output has toomanyrequests or
370370
# connection resets
371371
if [ contains "$pull_out" "toomanyrequests" ] || [ contains "$pull_out" "connection reset by peer" ]; then
372-
echo "WARNING: will retry:\n$pull_out"
372+
echo "WARNING: will retry: $pull_out"
373373
else
374-
echo "ERROR:\n$pull_out"
374+
echo "ERROR: $pull_out"
375375
exit $rc
376376
fi
377377
let retries=retries-1

0 commit comments

Comments
 (0)