disks explorer breaks macos #93

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

Created by: telmich

New global explorers should never break existing OS. However the disks explorer does w/ macos:

[21:30] line:~% cdist config  -p10 -bj5 -vvc ~/vcs/nico-dot-cdist/ lily
VERBOSE: cdist: version 4.11.0-4-ga8588019                             
INFO: [1964]: lily: Starting configuration run
VERBOSE: [1964]: lily: Running global explorers
ERROR: [1964]: lily: ssh -o User=root -o ControlPath=/tmp/tmpi4ms6gof/s -o ControlMaster=auto -o ControlPersist=2h lily /bin/sh -c ' export __target_host=lily;  export __target_hostname=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch;  export __target_fqdn=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch;  export __explorer=/var/lib/cdist/conf/explorer;  export __target_host_tags=;  export __cdist_log_level=15;  export __cdist_log_level_name=VERBOSE;/bin/sh -e /var/lib/cdist/conf/explorer/disks': ['ssh', '-o', 'User=root', '-o', 'ControlPath=/tmp/tmpi4ms6gof/s', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=2h', 'lily', "/bin/sh -c ' export __target_host=lily;  export __target_hostname=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch;  export __target_fqdn=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch;  export __explorer=/var/lib/cdist/conf/explorer;  export __target_host_tags=;  export __cdist_log_level=15;  export __cdist_log_level_name=VERBOSE;/bin/sh -e /var/lib/cdist/conf/explorer/disks'"]

Error processing global explorer 'disks'
========================================
name: disks
path: /tmp/tmp7v8bnzq2/89f288757f4d0693c99b007855fc075e/data/conf/explorer/disks

remote:stderr
-------------
cat: /etc/os-release: No such file or directory
cat: /usr/lib/os-release: No such file or directory
Darwin operating system is not supported, if you can please submit a patch

*Created by: telmich* New global explorers should *never* break existing OS. However the disks explorer does w/ macos: ``` [21:30] line:~% cdist config -p10 -bj5 -vvc ~/vcs/nico-dot-cdist/ lily VERBOSE: cdist: version 4.11.0-4-ga8588019 INFO: [1964]: lily: Starting configuration run VERBOSE: [1964]: lily: Running global explorers ERROR: [1964]: lily: ssh -o User=root -o ControlPath=/tmp/tmpi4ms6gof/s -o ControlMaster=auto -o ControlPersist=2h lily /bin/sh -c ' export __target_host=lily; export __target_hostname=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch; export __target_fqdn=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch; export __explorer=/var/lib/cdist/conf/explorer; export __target_host_tags=; export __cdist_log_level=15; export __cdist_log_level_name=VERBOSE;/bin/sh -e /var/lib/cdist/conf/explorer/disks': ['ssh', '-o', 'User=root', '-o', 'ControlPath=/tmp/tmpi4ms6gof/s', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=2h', 'lily', "/bin/sh -c ' export __target_host=lily; export __target_hostname=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch; export __target_fqdn=2a0a-e5c1-0111-0111-1016-3c5a-38b7-e225.loves.ipv6.at.ungleich.ch; export __explorer=/var/lib/cdist/conf/explorer; export __target_host_tags=; export __cdist_log_level=15; export __cdist_log_level_name=VERBOSE;/bin/sh -e /var/lib/cdist/conf/explorer/disks'"] Error processing global explorer 'disks' ======================================== name: disks path: /tmp/tmp7v8bnzq2/89f288757f4d0693c99b007855fc075e/data/conf/explorer/disks remote:stderr ------------- cat: /etc/os-release: No such file or directory cat: /usr/lib/os-release: No such file or directory Darwin operating system is not supported, if you can please submit a patch ```
Author
Owner

Created by: darko-poljak

Hm.. By default, do not assume, but print to stderr, empty stdout and exit 0.

*Created by: darko-poljak* Hm.. By default, do not assume, but print to stderr, empty stdout and exit 0.
Author
Owner

Created by: darko-poljak

I also see that new explorer error reporting is useful :)

*Created by: darko-poljak* I also see that new explorer error reporting is useful :)
Author
Owner

Created by: darko-poljak

Argh! So we need an assume default.
@nico Does macos have a proper way for listing disks, like lsblk for linux and sysctl for BSDs?

*Created by: darko-poljak* Argh! So we need an **assume** default. @nico Does macos have a proper way for listing disks, like lsblk for linux and sysctl for BSDs?
Author
Owner

Created by: telmich

[21:31] line:~% cdist -V
cdist 4.11.0-4-ga8588019
[21:32] line:~% cd vcs/cdist/
[21:32] line:cdist% git pull
Already up to date.
*Created by: telmich* ``` [21:31] line:~% cdist -V cdist 4.11.0-4-ga8588019 [21:32] line:~% cd vcs/cdist/ [21:32] line:cdist% git pull Already up to date. ```
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
ungleich-public/cdist#93
No description provided.