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

Commit 53477a7

Browse files
committed
Tag for 2.9.5 release
- Add --all-starting for pool delnode
1 parent c13793d commit 53477a7

File tree

6 files changed

+32
-14
lines changed

6 files changed

+32
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22

33
## [Unreleased]
44

5+
## [2.9.5] - 2017-09-24
56
### Added
67
- Optional `version` support for `platform_image`. This property can be
78
used to set a host OS version to prevent possible issues that occur with
89
`latest` image versions.
10+
- `--all-starting` option for `pool delnode` which will delete all nodes
11+
in starting state
912

1013
### Changed
1114
- Prevent invalid configuration of HPC offers with non-RDMA VM sizes
1215
- Expanded network tuning exemptions for new Dv3 and Ev3 sizes
1316
- Temporarily override Canonical UbuntuServer 16.04-LTS latest version to
14-
a prior version due to recent linux-azure kernel issues.
17+
a prior version due to recent linux-azure kernel issues
1518

1619
### Fixed
1720
- NV driver updates
@@ -854,7 +857,8 @@ transfer is disabled
854857
#### Added
855858
- Initial release
856859

857-
[Unreleased]: https://github.com/Azure/batch-shipyard/compare/2.9.4...HEAD
860+
[Unreleased]: https://github.com/Azure/batch-shipyard/compare/2.9.5...HEAD
861+
[2.9.5]: https://github.com/Azure/batch-shipyard/compare/2.9.4...2.9.5
858862
[2.9.4]: https://github.com/Azure/batch-shipyard/compare/2.9.3...2.9.4
859863
[2.9.3]: https://github.com/Azure/batch-shipyard/compare/2.9.2...2.9.3
860864
[2.9.2]: https://github.com/Azure/batch-shipyard/compare/2.9.0rc1...2.9.2

convoy/batch.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,23 +1166,27 @@ def reboot_nodes(batch_client, config, all_start_task_failed, node_id):
11661166

11671167

11681168
def del_node(
1169-
batch_client, config, all_start_task_failed, all_unusable, node_id):
1170-
# type: (batch.BatchServiceClient, dict, bool, bool, str) -> None
1169+
batch_client, config, all_start_task_failed, all_starting,
1170+
all_unusable, node_id):
1171+
# type: (batch.BatchServiceClient, dict, bool, bool, bool, str) -> None
11711172
"""Delete a node in a pool
11721173
:param batch_client: The batch client to use.
11731174
:type batch_client: `azure.batch.batch_service_client.BatchServiceClient`
11741175
:param dict config: configuration dict
11751176
:param bool all_start_task_failed: delete all start task failed nodes
1177+
:param bool all_starting: delete all starting nodes
11761178
:param bool all_unusable: delete all unusable nodes
11771179
:param str node_id: node id to delete
11781180
"""
11791181
node_ids = []
11801182
pool_id = settings.pool_id(config)
1181-
if all_start_task_failed or all_unusable:
1183+
if all_start_task_failed or all_starting or all_unusable:
11821184
filters = []
11831185
if all_start_task_failed:
11841186
filters.append('(state eq \'starttaskfailed\')')
1185-
if all_unusable:
1187+
elif all_starting:
1188+
filters.append('(state eq \'starting\')')
1189+
elif all_unusable:
11861190
filters.append('(state eq \'unusable\')')
11871191
nodes = list(
11881192
batch_client.compute_node.list(

convoy/fleet.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,23 +2534,27 @@ def action_pool_ssh(batch_client, config, cardinal, nodeid, tty, command):
25342534

25352535

25362536
def action_pool_delnode(
2537-
batch_client, config, all_start_task_failed, all_unusable, nodeid):
2538-
# type: (batchsc.BatchServiceClient, dict, bool, bool, str) -> None
2537+
batch_client, config, all_start_task_failed, all_starting,
2538+
all_unusable, nodeid):
2539+
# type: (batchsc.BatchServiceClient, dict, bool, bool, bool, str) -> None
25392540
"""Action: Pool Delnode
25402541
:param azure.batch.batch_service_client.BatchServiceClient batch_client:
25412542
batch client
25422543
:param dict config: configuration dict
25432544
:param bool all_start_task_failed: delete all start task failed nodes
2545+
:param bool all_starting: delete all starting nodes
25442546
:param bool all_unusable: delete all unusable nodes
25452547
:param str nodeid: nodeid to delete
25462548
"""
25472549
_check_batch_client(batch_client)
2548-
if (all_start_task_failed or all_unusable) and nodeid is not None:
2550+
if ((all_start_task_failed or all_starting or all_unusable) and
2551+
nodeid is not None):
25492552
raise ValueError(
25502553
'cannot specify all start task failed nodes or unusable with '
25512554
'a specific node id')
25522555
batch.del_node(
2553-
batch_client, config, all_start_task_failed, all_unusable, nodeid)
2556+
batch_client, config, all_start_task_failed, all_starting,
2557+
all_unusable, nodeid)
25542558

25552559

25562560
def action_pool_rebootnode(

convoy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2323
# DEALINGS IN THE SOFTWARE.
2424

25-
__version__ = '2.9.4'
25+
__version__ = '2.9.5'

docs/20-batch-shipyard-usage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ Azure Storage.
504504
* `delnode` will delete the specified node from the pool
505505
* `--all-start-task-failed` will delete all nodes in the start task
506506
failed state
507+
* `--all-starting` will delete all nodes in the starting state
507508
* `--all-unusable` will delete all nodes in the unusable state
508509
* `--nodeid` is the node id to delete
509510
* `dsu` will delete the SSH user defined in the pool configuration file

shipyard.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,10 @@ def pool_ssh(ctx, cardinal, nodeid, tty, command):
11891189
'--all-start-task-failed',
11901190
is_flag=True,
11911191
help='Delete all nodes in start task failed state')
1192+
@click.option(
1193+
'--all-starting',
1194+
is_flag=True,
1195+
help='Delete all nodes in starting state')
11921196
@click.option(
11931197
'--all-unusable',
11941198
is_flag=True,
@@ -1200,12 +1204,13 @@ def pool_ssh(ctx, cardinal, nodeid, tty, command):
12001204
@keyvault_options
12011205
@aad_options
12021206
@pass_cli_context
1203-
def pool_delnode(ctx, all_start_task_failed, all_unusable, nodeid):
1207+
def pool_delnode(
1208+
ctx, all_start_task_failed, all_starting, all_unusable, nodeid):
12041209
"""Delete a node from a pool"""
12051210
ctx.initialize_for_batch()
12061211
convoy.fleet.action_pool_delnode(
1207-
ctx.batch_client, ctx.config, all_start_task_failed, all_unusable,
1208-
nodeid)
1212+
ctx.batch_client, ctx.config, all_start_task_failed, all_starting,
1213+
all_unusable, nodeid)
12091214

12101215

12111216
@pool.command('rebootnode')

0 commit comments

Comments
 (0)