adamant-kite-43734
10/12/2023, 2:01 PMfast-bear-60513
10/12/2023, 3:44 PM/oem
path.
It should then be executed by the cos_setup_boot
systemd service if I recall correctly, you can check its logs.rich-kangaroo-77447
10/12/2023, 3:50 PM/usr/bin/elemental run-stage boot --debug
i can see some interesting stuff!
DEBU[2023-10-12T15:48:11Z] Creating file /etc/ssl/certs/rb.pem
some sysinfo dumps in between then:
DEBU[2023-10-12T15:48:11Z] running command `update-ca-certificates`
INFO[2023-10-12T15:48:11Z] Command output:
INFO[2023-10-12T15:48:11Z] Done executing stage 'boot'
But there is no file there....
cat /etc/ssl/certs/rb.pem
cat: /etc/ssl/certs/rb.pem: No such file or directory
fast-bear-60513
10/12/2023, 3:53 PM/etc/ssl/certs/crt.pem
?fast-bear-60513
10/12/2023, 3:53 PMrich-kangaroo-77447
10/12/2023, 3:53 PMfast-bear-60513
10/12/2023, 4:17 PMconfig:
cloud-config:
users:
- name: root
passwd: root
write_files:
- content: |-
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
owner: root
path: /etc/ssl/certs/test.pem
permission: '777'
and the file is correctly created.
I'm using elemental version 0.11.1, which is included in the baseImage: <http://registry.suse.com/rancher/elemental-teal-iso/5.4:1.2.2|registry.suse.com/rancher/elemental-teal-iso/5.4:1.2.2>
fast-bear-60513
10/12/2023, 4:19 PMm-3af904e7-d9e1-40c8-9a4b-eadb9aff1f53:~ # ls -al /etc/ssl/certs/test.pem
---------- 1 root root 53 Oct 12 16:15 /etc/ssl/certs/test.pem
m-3af904e7-d9e1-40c8-9a4b-eadb9aff1f53:~ # cat /etc/ssl/certs/test.pem
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
rich-kangaroo-77447
10/12/2023, 4:20 PMfast-bear-60513
10/12/2023, 4:21 PMelemental version
rich-kangaroo-77447
10/12/2023, 4:21 PMrich-kangaroo-77447
10/12/2023, 4:21 PMfast-bear-60513
10/12/2023, 4:21 PMfast-bear-60513
10/12/2023, 4:22 PM/oem/91_custom.yaml
rich-kangaroo-77447
10/12/2023, 4:23 PMm-34f505f6-acaa-45a0-8dc3-e36717312380:/oem # cat /oem/91_custom.yaml
#cloud-config
runcmd:
- update-ca-certificates
ssh_authorized_keys:
- ssh-rsa
users:
- name: root
passwd:
write_files:
- content: |-
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
owner: root
path: /etc/ssl/certs/rb.pem
permission: "777"
rich-kangaroo-77447
10/12/2023, 4:24 PMfast-bear-60513
10/12/2023, 4:25 PMrich-kangaroo-77447
10/12/2023, 4:25 PMfast-bear-60513
10/12/2023, 4:25 PMfast-bear-60513
10/12/2023, 4:25 PMfast-bear-60513
10/12/2023, 4:26 PMrich-kangaroo-77447
10/12/2023, 4:26 PMfast-bear-60513
10/12/2023, 4:26 PMrich-kangaroo-77447
10/12/2023, 4:27 PMrich-kangaroo-77447
10/12/2023, 4:27 PMruncmd:
- update-ca-certificates
it works.fast-bear-60513
10/12/2023, 4:27 PMfast-bear-60513
10/12/2023, 4:27 PMrich-kangaroo-77447
10/12/2023, 4:27 PMrich-kangaroo-77447
10/12/2023, 4:27 PMfast-bear-60513
10/12/2023, 4:29 PMfast-bear-60513
10/12/2023, 4:29 PMrich-kangaroo-77447
10/12/2023, 4:30 PMDEBU[2023-10-12T16:24:57Z] running command `update-ca-certificates`
INFO[2023-10-12T16:24:58Z] Command output:
INFO[2023-10-12T16:24:58Z] Done executing stage 'boot'
rich-kangaroo-77447
10/12/2023, 4:34 PMrich-kangaroo-77447
10/12/2023, 4:35 PMfast-bear-60513
10/12/2023, 4:37 PM/usr/local
is rw
rich-kangaroo-77447
10/12/2023, 4:38 PMfast-bear-60513
10/12/2023, 4:40 PMfast-bear-60513
10/12/2023, 4:41 PMrich-kangaroo-77447
10/12/2023, 4:43 PMOct 12 16:42:33 m-34f505f6-acaa-45a0-8dc3-e36717312380 rancher-system-agent[5989]: time="2023-10-12T16:42:33Z" level=info msg="[Applyinator] Running command: rke2 [etcd-snapshot save]"
Oct 12 16:42:33 m-34f505f6-acaa-45a0-8dc3-e36717312380 rancher-system-agent[5989]: time="2023-10-12T16:42:33Z" level=error msg="error executing instruction 1: exec: \"rke2\": executable file not found in $PATH"
fast-bear-60513
10/12/2023, 4:45 PMfast-bear-60513
10/12/2023, 4:46 PMjournalctl -u rancher-system-agent
rich-kangaroo-77447
10/12/2023, 4:48 PM16:47:26Z" level=info msg="[Applyinator] Command sh [-c rke2 etcd-snapshot list --etcd-s3=false 2>/dev/null] finished with err: <nil> and exit code: 127"
rich-kangaroo-77447
10/12/2023, 4:48 PM16:47:11Z" level=error msg="error encountered during parsing of last run time: parsing time \"\" as \"Mon Jan _2 15:04:05 MST 2006\": cannot parse \"\" as \"Mon\""
fast-bear-60513
10/12/2023, 4:49 PMfast-bear-60513
10/12/2023, 4:50 PMrich-kangaroo-77447
10/12/2023, 5:08 PM/etc/ssl/certs/crt.pem
and running
update-ca-certificates
It removes the crt and does not successfully add it to the trust no matter what i do.
but...
adding a cert to /etc/pki/trust/anchors/
Works like a charm and no need to run that command.
Is this something that you guys might want to edit in the documentation?fast-bear-60513
10/13/2023, 8:04 AM