Azure / Azure/azure-sdk-for-python

begin_reboot_node method raises ValueError for 'content-type' header in azure-batch v15.1.0

Open
#46,815 1 comment 0 reactions 1 assignee Claimed by @xingwu1 View on GitHub
Batch bug Client customer-reported needs-team-attention Service Attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

- **Package Name**: azure-batch
- **Package Version**: v15.1.0
- **Operating System**: Ubuntu
- **Python Version**: 3.11.15

**Describe the bug**
When attempting to reboot an Azure Batch node using the `client.begin_reboot_node` method, a `ValueError: No value for given attribute` is raised. The traceback suggests the error occurs during the serialization of the `content-type` header within the `_BatchClientOperationsMixin._reboot_node_internal` method.

**To Reproduce**
Steps to reproduce the behavior:
1. Initialize the Azure Batch client using
```
credentials = DefaultAzureCredential()
batch_url = ''
client = BatchClient(credential=credentials, endpoint=batch_url)
```
2. Call the `begin_reboot_node` method with valid `pool_id` and `node_id`.
```
pool_id = ''
node_id = ''

client.begin_reboot_node(
pool_id = pool_id,
node_id = node_id
)
```

**Expected behavior**
The Azure Batch node should successfully initiate a reboot without raising a ValueError.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.