Make ifconfig optional #122

Closed
opened 2021-11-20 13:24:16 +00:00 by ungleich-gitea · 4 comments

Created by: telmich

Instead of failing, allow soft fail

[19:50] line:~% cdist config -vvc ~/vcs/ungleich-dot-cdist/ -p10 -bj10 quizv6.ungleich.ch
VERBOSE: cdist: version 4.8.3-6-g43a65d91
WARNING: [7540]: quizv6.ungleich.ch: Could not derive host_name for quizv6.ungleich.ch, $host_name will be empty. Error is: [Errno 1] Unknown host
INFO: [7540]: quizv6.ungleich.ch: Starting configuration run
VERBOSE: [7540]: quizv6.ungleich.ch: Running global explorers
ERROR: [7540]: quizv6.ungleich.ch: Command failed: 'ssh -o User=root -o ControlPersist=2h -o ControlPath=/tmp/tmpjx0247is/s -o ControlMaster=auto quizv6.ungleich.ch /bin/sh -c ' export __explorer=/var/lib/cdist/conf/explorer;  export __target_fqdn=quizv6.ungleich.ch;  export __target_host_tags=;  export __target_host=quizv6.ungleich.ch;  export __cdist_log_level=15;  export __target_hostname=;  export __cdist_log_level_name=VERBOSE;/bin/sh -e /var/lib/cdist/conf/explorer/ifconfig''
return code: 127
---- BEGIN stdout ----
---- END stdout ----
VERBOSE: cdist: Total processing time for 1 host(s): 1.4304490089416504
[19:50] line:~% 
*Created by: telmich* Instead of failing, allow soft fail ``` [19:50] line:~% cdist config -vvc ~/vcs/ungleich-dot-cdist/ -p10 -bj10 quizv6.ungleich.ch VERBOSE: cdist: version 4.8.3-6-g43a65d91 WARNING: [7540]: quizv6.ungleich.ch: Could not derive host_name for quizv6.ungleich.ch, $host_name will be empty. Error is: [Errno 1] Unknown host INFO: [7540]: quizv6.ungleich.ch: Starting configuration run VERBOSE: [7540]: quizv6.ungleich.ch: Running global explorers ERROR: [7540]: quizv6.ungleich.ch: Command failed: 'ssh -o User=root -o ControlPersist=2h -o ControlPath=/tmp/tmpjx0247is/s -o ControlMaster=auto quizv6.ungleich.ch /bin/sh -c ' export __explorer=/var/lib/cdist/conf/explorer; export __target_fqdn=quizv6.ungleich.ch; export __target_host_tags=; export __target_host=quizv6.ungleich.ch; export __cdist_log_level=15; export __target_hostname=; export __cdist_log_level_name=VERBOSE;/bin/sh -e /var/lib/cdist/conf/explorer/ifconfig'' return code: 127 ---- BEGIN stdout ---- ---- END stdout ---- VERBOSE: cdist: Total processing time for 1 host(s): 1.4304490089416504 [19:50] line:~% ```
Author
Owner

Created by: darko-poljak

@telmich Ah yes. This explorer is from dot-cdist repo. There is ifconfig global explorer with ifconfig -a content. So this is not related to this cdist :)

*Created by: darko-poljak* @telmich Ah yes. This explorer is from dot-cdist repo. There is ifconfig global explorer with `ifconfig -a` content. So this is not related to this cdist :)
Author
Owner

Created by: darko-poljak

@telmich What is weird to me is this part of Command failed line:
/bin/sh -e /var/lib/cdist/conf/explorer/ifconfig.
Like there is ifconfig explorer from somewhere, not part of some explorer.

*Created by: darko-poljak* @telmich What is weird to me is this part of `Command failed` line: **/bin/sh -e /var/lib/cdist/conf/explorer/ifconfig**. Like there is ifconfig explorer from somewhere, not part of some explorer.
Author
Owner

Created by: telmich

@darko-poljak it's part of global explorers, as my rgrep confirms:

./interfaces:23:# If your OS is not supported please provide a ifconfig output
./interfaces:32:if ! command -v ifconfig >/dev/null; then
./interfaces:33:   # no ifconfig, nothing we could do
./interfaces:42:	ifconfig -a | sed -n -E "$REGEXP"
./interfaces:45:	ifconfig -a | sed -n -r "$REGEXP"
./interfaces:48:	echo "Unsupported ifconfig output for $uname_s" >&2
*Created by: telmich* @darko-poljak it's part of global explorers, as my rgrep confirms: ``` ./interfaces:23:# If your OS is not supported please provide a ifconfig output ./interfaces:32:if ! command -v ifconfig >/dev/null; then ./interfaces:33: # no ifconfig, nothing we could do ./interfaces:42: ifconfig -a | sed -n -E "$REGEXP" ./interfaces:45: ifconfig -a | sed -n -r "$REGEXP" ./interfaces:48: echo "Unsupported ifconfig output for $uname_s" >&2 ```
Author
Owner

Created by: darko-poljak

@telmich Is /var/lib/cdist/conf/explorer/ifconfig global explorer from cdist distribution?
Because I don't see that explorer in conf/explorer.

*Created by: darko-poljak* @telmich Is /var/lib/cdist/conf/explorer/ifconfig global explorer from cdist distribution? Because I don't see that explorer in conf/explorer.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
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: ungleich-public/cdist#122
No description provided.