[GH-ISSUE #372] Undefined subroutine &main::EXIT #100

Closed
opened 2026-05-07 00:18:55 +02:00 by BreizhHardware · 1 comment

Originally created by @Krenodeno on GitHub (Mar 13, 2023).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/372

Hi,

Freshly installed a bastion on a Ubuntu 22.04 host last friday. I added a group, a server in that group. So far everything went great.

Today I wanted to add another group with the following command:
bastion --osh groupCreate --group group1 --owner user1 --algo ed25519 --no-key
Note the use of algo and no-key options.

And I got the following error:

╭──bastion.mycompany.com──────────────────────────────────the-bastion-3.10.00───
│ ▶ create a new group
├───────────────────────────────────────────────────────────────────────────────
Undefined subroutine &main::EXIT called at /opt/bastion/bin/helper/osh-groupCreate line 48.
│
│ ⛔ The helper didn't return any data, maybe it crashed, please report to your sysadmin!

Looking at the source file, around line 48:

if ($no_key && ($algo || $size || $encrypted)) {
    EXIT('ERR_INVALID_PARAMETER', msg => "Can't specify 'no-key' along with 'algo', 'size' or 'encrypted'");
}

It looks like the EXIT function is unknow here.

Originally created by @Krenodeno on GitHub (Mar 13, 2023). Original GitHub issue: https://github.com/ovh/the-bastion/issues/372 Hi, Freshly installed a bastion on a Ubuntu 22.04 host last friday. I added a group, a server in that group. So far everything went great. Today I wanted to add another group with the following command: `bastion --osh groupCreate --group group1 --owner user1 --algo ed25519 --no-key` Note the use of `algo` and `no-key` options. And I got the following error: ``` ╭──bastion.mycompany.com──────────────────────────────────the-bastion-3.10.00─── │ ▶ create a new group ├─────────────────────────────────────────────────────────────────────────────── Undefined subroutine &main::EXIT called at /opt/bastion/bin/helper/osh-groupCreate line 48. │ │ ⛔ The helper didn't return any data, maybe it crashed, please report to your sysadmin! ``` Looking at the source file, around line 48: ``` if ($no_key && ($algo || $size || $encrypted)) { EXIT('ERR_INVALID_PARAMETER', msg => "Can't specify 'no-key' along with 'algo', 'size' or 'encrypted'"); } ``` It looks like the `EXIT` function is unknow here.
BreizhHardware 2026-05-07 00:18:55 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@speed47 commented on GitHub (Mar 14, 2023):

Indeed, that's a typo, and the only one of its kind according to git grep!
The code path you took with --no-key --algo is not used by the tests it seems.
Fixing this, thanks for the report!

<!-- gh-comment-id:1467741514 --> @speed47 commented on GitHub (Mar 14, 2023): Indeed, that's a typo, and the only one of its kind according to `git grep`! The code path you took with `--no-key --algo` is not used by the tests it seems. Fixing this, thanks for the report!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#100
No description provided.