<#680 BUG: osctrl-cli node tag in --db mode fails ...
# osctrl
g
#680 BUG: osctrl-cli node tag in --db mode fails due to contradictory environment flag requirement Issue created by KshitijPatil98 When using osctrl-cli in --db mode, the node tag command fails with a contradictory error. If the --env flag is omitted, the command fails with an error stating "environment is required". If the --env flag is provided, the command fails with the error "flag provided but not defined: -env". This makes it impossible to tag nodes in --db mode. Steps to reproduce the behavior: Start the osctrl backend services (postgres, etc.). Attempt to tag an existing node using osctrl-cli in --db mode without specifying an environment: docker run --rm --network <your_network> -e DB_HOST=<db_host> -e DB_NAME=<db_name> -e DB_USER=<db_user> -e DB_PASS=<db_pass> --entrypoint /opt/osctrl/bin/osctrl-cli <your_cli_image> --db node tag --uuid "some-uuid" --name "some-tag" This results in an error similar to: environment is required. Attempt the same command, but provide the environment using the --env flag: docker run --rm --network <your_network> -e DB_HOST=<db_host> -e DB_NAME=<db_name> -e DB_USER=<db_user> -e DB_PASS=<db_pass> --entrypoint /opt/osctrl/bin/osctrl-cli <your_cli_image> --db node tag --uuid "some-uuid" --name "some-tag" --env "some-environment" This results in a fatal error: Failed to execute - flag provided but not defined: -env. {"level":"fatal","time":"2025-08-19T061511Z","message":" Failed to execute - flag provided but not defined: -env"} Expected behavior The node tag command should either: A) Successfully tag the node using only the --uuid, as it's a globally unique identifier. B) Accept an --env or --environment flag to satisfy the environment requirement. Actual behavior The command is in an unresolvable state where it requires a flag that it does not recognize. osctrl-cli Version: 0.4.5 Mode: --db (direct database connection) Can you please solve this bug thanks. If you dont have bandwidth, I can try and find some time. jmpsec/osctrl