We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproduced with iRODS 4.2.12 and 4.3.2, both CentOS 7 and Ubuntu 20.04 LTS.
Run iadmin commands that resulted in a failure (see observed behaviour below for examples)
If an iadmin command fails, it should return a non-zero exit code, so that any scripts that invoked the command can tell that it failed.
iadmin returns a zero exit code in at least the following situations:
Invalid iadmin command:
irods@provider:~$ iadmin commanddoesnotexist unrecognized command, try 'help' irods@provider:~$ echo $? 0
ModRepl with invalid parameters:
irods@provider:~$ iadmin modrepl foo bar baz An error occurred: Input arguments do not match expected values. irods@provider:~$ echo $? 0
ModRepl with non-existent data object:
irods@provider:~$ iadmin modrepl logical_path /tempZone/object/does/not/exist replica_number 0 DATA_COMMENTS something rcModDataObjMeta failed when modifying replica: [CAT_UNKNOWN_COLLECTION (-814000)] Level 0: collection '/tempZone/object/does/not' is unknown Level 0: collection '/tempZone/object/does/not' is unknown irods@provider:~$ echo $? 0
ModRepl with non-existent replica number:
irods@provider:~$ iadmin modrepl logical_path /tempZone/home/rods/test.txt replica_number 123 DATA_COMMENTS something rcModDataObjMeta failed when modifying replica: [CAT_SUCCESS_BUT_WITH_NO_INFO (-819000)] irods@provider:~$ echo $? 0
ModRepl with invalid replica number:
irods@provider:~$ iadmin modrepl logical_path /tempZone/home/rods/test.txt replica_number abc DATA_COMMENTS something An error occurred: Invalid input [abc] for replica_number. irods@provider:~$ echo $? 0
ModRepl with invalid data object ID:
irods@provider:~$ iadmin modrepl data_id abc replica_number 123456789 DATA_COMMENTS something An error occurred: Invalid input [abc] for data_id. irods@provider:~$ echo $? 0
ModRepl with non-existent data object ID:
irods@provider:~$ iadmin modrepl data_id 1234567 replica_number 123456789 DATA_COMMENTS something rcModDataObjMeta failed when modifying replica: [CAT_SUCCESS_BUT_WITH_NO_INFO (-819000)] irods@provider:~$ echo $? 0
The text was updated successfully, but these errors were encountered:
Agreed.
Sorry, something went wrong.
No branches or pull requests
Bug Report
iRODS Version, OS and Version
Reproduced with iRODS 4.2.12 and 4.3.2, both CentOS 7 and Ubuntu 20.04 LTS.
What did you try to do?
Run iadmin commands that resulted in a failure (see observed behaviour below for examples)
Expected behavior
If an iadmin command fails, it should return a non-zero exit code, so that any scripts that invoked the command can tell that it failed.
Observed behavior (including steps to reproduce, if applicable)
iadmin returns a zero exit code in at least the following situations:
Invalid iadmin command:
ModRepl with invalid parameters:
ModRepl with non-existent data object:
ModRepl with non-existent replica number:
ModRepl with invalid replica number:
ModRepl with invalid data object ID:
ModRepl with non-existent data object ID:
The text was updated successfully, but these errors were encountered: