Microcloud preseed usage

I’m trying to use a microcloud preseed file for 7 machines, where there are ceph disks in only 4 of them. Using the interactive init I’m asked if it’s ok that not all machines have disks, which is the intended usage. I’m now trying to do the same configuration using a preseed file. On the machines section I’ve tried two aproaches, as follows.

This is the first approach, where I got the following message: Error: Some systems are missing ceph storage disks

systems:
- name: compartilhado01
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: compartilhado02
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: compartilhado03
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: compartilhado04
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: dedicado01
  ovn_uplink_interface: br0
- name: dedicado02
  ovn_uplink_interface: br0
- name: dedicado03
  ovn_uplink_interface: br0

Since there are no disks for machines whose name starts with dedicado, I didn’t put anything on the storage section. So next I tried to add the section but without any disks as follows, but I got the same error.

systems:
- name: compartilhado01
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: compartilhado02
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: compartilhado03
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: compartilhado04
  ovn_uplink_interface: br0
  storage:
    ceph:
    - path: /dev/sdb
      wipe: true
    - path: /dev/sdc
      wipe: true
- name: dedicado01
  ovn_uplink_interface: br0
  storage:
    ceph:
- name: dedicado02
  ovn_uplink_interface: br0
  storage:
    ceph:
- name: dedicado03
  ovn_uplink_interface: br0
  storage:
    ceph:

Is it possible to add a preseed without ceph disks on some machines? It is doable through the normal init command.

Yes, at the moment the preseed is a bit strict with disk selection. Currently it expects you to provide a filter if you’re not selecting disks for each system. This is something we should fix. You can get around this for now by adding a global disk filter for something non-existent to the end of your config:

storage:
  ceph:
    - find: id == thisisfake
      find_min: 0

To clarify, this should go outside the systems section.

@masnax does this PR fix this?

https://github.com/canonical/microcloud/pull/227