bug(lxd): lxc.config.device disk source shouldn't be required
kellian-cottart opened this issue · 2 comments
Describe the bug
lxc.config.device
disk source shouldn't be required, as it hinders the usage of certain commands that don't require the source to be specified.
Example Project
Let's say you're building a cluster with lxc.cluster
. If you want to configure the size of the root
disk of each instance, you would have to do this:
await @lxc.config.device
$header: config.container + ' - Configuring devices...'
container: config.container
device: 'root'
type: 'disk'
properties:
pool: 'local'
path: '/'
size: '50GB'
This is not working because the source
needs to be specified according to the schema
, but the final command rejects usage of source
if you add one.
Current bug behavior
Schema specifies the need of a source
, but some commands don't necessitate this source.
Expected correct behavior
Schema should allow the user to ignore the source.
Possible fixes
The file full path is node-nikita/packages/lxd/src/config/device/index.coffee.md
.
A simple fix would be changing line 83 from:
required: ['path', 'source']
To:
required: ['path']
ok
Corresponding PR fix: #390