Skip to content

Commit 54f2bae

Browse files
committed
Bump minimum shell agent version from 1.2.0 to 1.2.1
The shell agent 1.2.0 release was broken, so 1.2.1 is now the working minimum version.
1 parent 411d044 commit 54f2bae

10 files changed

Lines changed: 24 additions & 24 deletions

File tree

docs/choria-transport-dev.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ gem, which provides `MCollective::RPC::Client`. Despite the MCollective name
6060
- **shell**: A separate plugin
6161
([choria-plugins/shell-agent](https://github.com/choria-plugins/shell-agent)).
6262
Provides synchronous (`run`) and asynchronous (`start`/`list`/`statuses`/`kill`)
63-
command execution. Version 1.2.0+ required for the batched `statuses` action.
63+
command execution. Version 1.2.1+ required for the batched `statuses` action.
6464

6565
## File Layout
6666

@@ -93,7 +93,7 @@ identity. Each entry stores `{ agents: [...], os: 'redhat'|'windows'|... }`.
9393
The cache lives for the transport instance's lifetime. Non-responding targets
9494
are not cached (intentional, to allow retry on transient failures).
9595

96-
Agent versions are checked against `AGENT_MIN_VERSIONS` (e.g., shell >= 1.2.0).
96+
Agent versions are checked against `AGENT_MIN_VERSIONS` (e.g., shell >= 1.2.1).
9797
Agents below the minimum are excluded from the cache and logged as warnings.
9898

9999
### RPC Request Pipeline
@@ -368,7 +368,7 @@ error. This is simpler and more predictable than a try-and-fallback approach.
368368

369369
Shell polling uses `shell.list` + `shell.statuses` instead of per-handle
370370
`shell.status` calls. This reduces RPC overhead from O(N) per round to O(1)
371-
per target node, making it feasible at scale. This is why version 1.2.0
371+
per target node, making it feasible at scale. This is why version 1.2.1
372372
of the shell agent is required, since this is the version version to include
373373
`shell.statuses`.
374374

docs/choria-transport-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ which Choria agents are available on the remote nodes:
2323
| Phase | Agents Required | Capabilities Added |
2424
|-------|----------------|-------------------|
2525
| Phase 1 | bolt_tasks (ships with Choria+Puppet) | `run_task` (OpenVox/Puppet Server tasks only) |
26-
| Phase 2 | shell >= 1.2.0 (separate install) | `run_command`, `run_script`, `run_task` (local tasks) |
26+
| Phase 2 | shell >= 1.2.1 (separate install) | `run_command`, `run_script`, `run_task` (local tasks) |
2727
| Phase 3 | bolt_tasks | [foreman_openbolt](https://github.com/overlookinfra/foreman_openbolt) and [smart_proxy_openbolt](https://github.com/overlookinfra/smart_proxy_openbolt) Choria transport support (bolt_tasks only) |
2828
| Phase 4 | file-transfer (new, to be written) | `upload`, `download` (any size, chunked) |
2929
| Phase 5 | (all above) | Full plan support including apply blocks |

docs/choria-transport-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ mod 'choria-mcollective', :latest
221221
mod 'choria-mcollective_choria', :latest
222222
mod 'mcollective_agent_shell',
223223
git: 'https://github.com/choria-plugins/shell-agent',
224-
ref: '1.2.0'
224+
ref: '1.2.1'
225225
```
226226

227-
The shell agent requires version 1.2.0 or later (for the batched `statuses`
227+
The shell agent requires version 1.2.1 or later (for the batched `statuses`
228228
action). The `bolt_tasks` agent is included in a standard Choria install and
229229
does not need a separate Puppetfile entry.
230230

docs/choria-transport.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For test environment setup, see [choria-transport-testing.md](choria-transport-t
2424
- A Choria client config file on the OpenBolt controller
2525
- At least one of the supported agents installed on target nodes:
2626
- **bolt_tasks** (ships with Puppet-enabled Choria setups)
27-
- **shell** (separate install, version 1.2.0 or later)
27+
- **shell** (separate install, version 1.2.1 or later)
2828

2929
## Configuration
3030

@@ -134,7 +134,7 @@ validation.
134134

135135
### run_command
136136

137-
Requires the **shell agent** (>= 1.2.0) on target nodes.
137+
Requires the **shell agent** (>= 1.2.1) on target nodes.
138138

139139
```bash
140140
bolt command run 'hostname -f' --targets node1.example.com,node2.example.com
@@ -146,7 +146,7 @@ process is killed on the target node.
146146

147147
### run_script
148148

149-
Requires the **shell agent** (>= 1.2.0) on target nodes.
149+
Requires the **shell agent** (>= 1.2.1) on target nodes.
150150

151151
```bash
152152
bolt script run ./check_disk.sh --targets node1.example.com
@@ -205,7 +205,7 @@ task files from an OpenVox/Puppet Server and executes them. This means:
205205
### shell (separate install)
206206

207207
The [shell agent](https://github.com/choria-plugins/shell-agent) is a
208-
separate Choria plugin. Version 1.2.0 or later is required. It must be
208+
separate Choria plugin. Version 1.2.1 or later is required. It must be
209209
installed on target nodes.
210210

211211
With the shell agent:
@@ -220,7 +220,7 @@ and loaded automatically. No client-side setup is needed.
220220

221221
On first contact with a target, the transport automatically discovers which
222222
agents are installed and what OS the target is running. This happens
223-
transparently. Agents below the required minimum version (e.g., shell < 1.2.0)
223+
transparently. Agents below the required minimum version (e.g., shell < 1.2.1)
224224
are excluded and treated as unavailable.
225225

226226
If a target is missing the required agent, it gets a clear error result with
@@ -235,7 +235,7 @@ Install via Puppet by referencing the GitHub repository in your Puppetfile:
235235
```ruby
236236
mod 'mcollective_agent_shell',
237237
git: 'https://github.com/choria-plugins/shell-agent',
238-
ref: 'v1.2.0'
238+
ref: 'v1.2.1'
239239
```
240240

241241
Deploy with r10k or Code Manager, then apply via Hiera:
@@ -347,7 +347,7 @@ local modulepath matters.
347347

348348
2. **Shell agent not installed by default.** Without it, only `run_task`
349349
(via bolt_tasks + OpenVox/Puppet Server) works. All other operations fail with a
350-
clear error message. Version 1.2.0 or later is required.
350+
clear error message. Version 1.2.1 or later is required.
351351

352352
3. **bolt_tasks requires an OpenVox/Puppet Server.** The bolt_tasks agent downloads
353353
task files from the OpenVox/Puppet Server. Tasks not served by the OpenVox/Puppet Server

lib/bolt/transport/choria.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module Transport
2424
# them via task_wrapper. All other operations fail with an actionable
2525
# error directing the user to install the shell agent.
2626
#
27-
# shell agent installed (>= 1.2.0): run_command, run_script, and
27+
# shell agent installed (>= 1.2.1): run_command, run_script, and
2828
# run_task work. run_task uses the bolt_tasks agent by default.
2929
# To run local tasks via the shell agent, set task-agent to 'shell'
3030
# in project config or specify --choria-task-agent shell.

lib/bolt/transport/choria/agent_discovery.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Bolt
44
module Transport
55
class Choria
6-
SHELL_MIN_VERSION = '1.2.0'
6+
SHELL_MIN_VERSION = '1.2.1'
77

88
AGENT_MIN_VERSIONS = {
99
'shell' => SHELL_MIN_VERSION

lib/bolt/transport/choria/shell.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def shell_list(remaining)
466466
end
467467

468468
# Fetch stdout/stderr/exitcode from completed targets via the
469-
# shell.statuses RPC action. Requires shell agent >= 1.2.0.
469+
# shell.statuses RPC action. Requires shell agent >= 1.2.1.
470470
#
471471
# @param targets [Hash{Bolt::Target => Hash}] Completed targets mapped to { handle: uuid_string }
472472
# @return [Hash{Bolt::Target => Hash}] Output hash for each target

lib/mcollective/agent/shell.ddl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ metadata :name => "shell",
22
:description => "Run commands with the local shell",
33
:author => "Puppet Labs",
44
:license => "Apache-2.0",
5-
:version => "1.2.0",
5+
:version => "1.2.1",
66
:url => "https://github.com/choria-plugins/shell-agent",
77
:timeout => 180
88

spec/lib/bolt_spec/choria.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def make_rpc_result(sender:, statuscode: 0, statusmsg: 'OK', data: {})
4040
# variables are cleared between `it` blocks.
4141
#
4242
# Accepts Bolt::Target objects or host strings, single or as an array.
43-
# Agents can be strings (version defaults to '1.2.0') or [name, version]
43+
# Agents can be strings (version defaults to '1.2.1') or [name, version]
4444
# pairs for version-specific scenarios.
4545
#
4646
# stub_agents(target, %w[rpcutil shell])
@@ -51,7 +51,7 @@ def stub_agents(targets, agents, os_family: 'RedHat')
5151
targets = [targets].flatten
5252

5353
agent_data = agents.map do |agent|
54-
name, version = agent.is_a?(Array) ? agent : [agent, '1.2.0']
54+
name, version = agent.is_a?(Array) ? agent : [agent, '1.2.1']
5555
{ 'agent' => name, 'name' => name, 'version' => version }
5656
end
5757

spec/unit/transport/choria/agent_discovery_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
agents: [{ 'agent' => 'rpcutil' }, { 'agent' => 'bolt_tasks' }]
1717
})
1818
r2 = make_rpc_result(sender: target2, data: {
19-
agents: [{ 'agent' => 'rpcutil' }, { 'agent' => 'shell', 'version' => '1.2.0' }]
19+
agents: [{ 'agent' => 'rpcutil' }, { 'agent' => 'shell', 'version' => '1.2.1' }]
2020
})
2121

2222
f1 = make_rpc_result(sender: target, data: { value: 'RedHat' })
@@ -80,7 +80,7 @@
8080
it 'discards responses from unexpected senders' do
8181
legit = make_rpc_result(sender: target, data: {
8282
agents: [{ 'agent' => 'rpcutil', 'version' => '1.0.0' },
83-
{ 'agent' => 'shell', 'version' => '1.2.0' }]
83+
{ 'agent' => 'shell', 'version' => '1.2.1' }]
8484
})
8585
rogue = make_rpc_result(sender: 'evil.example.com', data: {
8686
agents: [{ 'agent' => 'rpcutil' }, { 'agent' => 'bolt_tasks' }]
@@ -198,7 +198,7 @@
198198
it 'defaults to POSIX when OS detection fails' do
199199
result = make_rpc_result(sender: target, data: {
200200
agents: [{ 'agent' => 'rpcutil', 'version' => '1.0.0' },
201-
{ 'agent' => 'shell', 'version' => '1.2.0' }]
201+
{ 'agent' => 'shell', 'version' => '1.2.1' }]
202202
})
203203
allow(mock_rpc_client).to receive(:agent_inventory).and_return([result])
204204

@@ -212,7 +212,7 @@
212212
it 'defaults to POSIX when os.family fact is an empty string' do
213213
result = make_rpc_result(sender: target, data: {
214214
agents: [{ 'agent' => 'rpcutil', 'version' => '1.0.0' },
215-
{ 'agent' => 'shell', 'version' => '1.2.0' }]
215+
{ 'agent' => 'shell', 'version' => '1.2.1' }]
216216
})
217217

218218
fact_result = make_rpc_result(sender: target, data: { value: '' })
@@ -226,7 +226,7 @@
226226
it 're-raises Bolt::Error from OS detection instead of swallowing it' do
227227
result = make_rpc_result(sender: target, data: {
228228
agents: [{ 'agent' => 'rpcutil', 'version' => '1.0.0' },
229-
{ 'agent' => 'shell', 'version' => '1.2.0' }]
229+
{ 'agent' => 'shell', 'version' => '1.2.1' }]
230230
})
231231
allow(mock_rpc_client).to receive(:agent_inventory).and_return([result])
232232

0 commit comments

Comments
 (0)