Bug 44123 - udm-cli should return EXIT_FAILURE on errors
udm-cli should return EXIT_FAILURE on errors
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UDM maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-29 10:32 CEST by Philipp Hahn
Modified: 2022-08-26 15:17 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-03-29 10:32:38 CEST
udm-cli create does not exit with an exit code != 0 in all cases:

# udm dns/host_record create --superordinate "zoneName=$(ucr get domainname),cn=dns,$(ucr get ldap/base)" --set name=host --append a=10.201.17.1 --append a=10.201.17.2 --append a=2001:4dd0:dd00:8c42:ff17:0011:2233 --set mx="10 $(hostname -f)" --append txt=Test1 --append txt="Text 2" --set foo=bar ; echo $?

WARNING: No attribute with name 'foo' in this module, value not set.

E: Invalid Syntax: a: Not a valid IP address!

Object created: relativeDomainName=host,zoneName=pt42.intranet,cn=dns,dc=pt42,dc=intranet

0
Comment 1 Florian Best univentionstaff 2022-08-26 15:17:37 CEST
# udm dns/host_record create --superordinate "zoneName=$(ucr get domainname),cn=dns,$(ucr get ldap/base)" --set name=host --append a=10.201.17.1 --append a=10.201.17.2 --append a=2001:4dd0:dd00:8c42:ff17:0011:2233 --set mx="10 $(hostname -f)" --append txt=Test1 --append txt="Text 2" --set foo=bar ; echo $?
WARNING: No attribute with name 'foo' in this module, value not set.
E: Invalid Syntax: a: Not a valid IP address!
3