Systemd unit is not created on master node
I have been following [this official guide](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/installing_on_openstack/deploying-openstack-on-local-disk) on setting up a mount and formatting a local disk. However, the systemd unit is never created although the mc is is applied to the mcp without any issues in the logs. There is not a single failure, log or trace related to this config.
with the following file
```yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 98-var-mnt-longhorn1
spec:
config:
ignition:
version: 3.5.0
systemd:
units:
- contents: |
[Unit]
Description=Mount longhorn to /var/mnt/longhorn1
[Mount]
What=/dev/disk/by-label/longhorn
Where=/var/mnt/longhorn1
Type=xfs
Options=defaults
[Install]
WantedBy=local-fs.target
enabled: true
name: var-mnt-longhorn1.mount
- contents: |
[Unit]
Description=Create longhorn filesystem
DefaultDependencies=no
After=local-fs-pre.target
ConditionPathIsSymbolicLink=!/dev/disk/by-label/longhorn
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c "[ -L /dev/disk/by-label/ephemeral0 ] || ( >&2 echo Ephemeral disk does not exist; /usr/bin/false )"
ExecStart=/usr/sbin/mkfs -t xfs -f -L longhorn /dev/disk/by-label/ephemeral0
[Install]
RequiredBy=dev-disk-by\x2dlabel-longhorn.device
enabled: true
name: create-longhorn.service
```
关闭于 2025-06-26 1 条评论