Skip to content

Broken process substitution for multipass launch command #1589

@mattiaperi

Description

@mattiaperi

Describe the bug
I manage multipass vms via bash scripts, providing cloud-init configuration files via process substitution (<(command)). Since multipass v1.2.0 multipass is not managing correctly this kind of inter-process communication providing error: No such file: /dev/fd/63 running command multipass launch. Please find hereunder the difference between v1.1.0 and v.1.2.0 (and v1.2.1 of course).

To Reproduce

macos:~ perim$ multipass version
multipass  1.1.0+mac
multipassd 1.1.0+mac

###########################################################################################
New Multipass 1.2.1 release
Ubuntu 20.04 LTS released!

Go here for more information: https://github.com/CanonicalLtd/multipass/releases/tag/v1.2.1
###########################################################################################

macos:~ perim$ k3s_cloud_init() {
> cat << EOF
> #cloud-config
> runcmd:
>  - '\curl -sfL https://get.k3s.io | sh -s -'
> EOF
> }

macos:~ perim$ multipass launch --name k3s --cpus 2 --mem 2G --disk 2G --cloud-init <(k3s_master_cloud_init)
Waiting for initialization to complete /^C

[...] [fast-forward uninstall 1.1.0 and install 1.2.0]

macos:~ perim$ multipass version
multipass  1.2.0+mac
multipassd 1.2.0+mac

###########################################################################################
New Multipass 1.2.1 release
Ubuntu 20.04 LTS released!

Go here for more information: https://github.com/CanonicalLtd/multipass/releases/tag/v1.2.1
###########################################################################################

macos:~ perim$ multipass launch --name k3s --cpus 2 --mem 2G --disk 2G --cloud-init <(k3s_master_cloud_init)
error: No such file: /dev/fd/63

Expected behavior
I expect the correct management of the process substitution <(command) as inter-process communication, as before version 1.2.0

Logs
No log related to the issue in /Library/Logs/Multipass/multipassd.log

Additional info

  • macOS 10.14.6
  • multipass version
multipass  1.2.0+mac
multipassd 1.2.0+mac

Additional context
According to 1.2.0 release notes, my suspect is that the feature "check for --cloud-init file existence (#1491)" might have broken the normal behaviour, because of the type of file created by the process substitution (i.e. /dev/fd/63) that it only exists as long as the process is running.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions