Snapcraft tutorial errors out on OSX with multipass error, "returned exit code 2"
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Attempting to run through the Go tutorial on OSX results in the following when running `snapcraft` the first time:
```
Launching a VM.
Launched: snapcraft-test-httplab-dobs
2019-12-16T15:57:59Z INFO Waiting for restart...
snapd 2.42.5 from Canonical✓ installed
core18 20191126 from Canonical✓ installed
snapcraft 3.8 from Canonical✓ installed
Ign:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu bionic-security Release
404 Not Found [IP: 91.189.91.14 80]
Ign:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu bionic Release
404 Not Found [IP: 91.189.88.24 80]
Err:7 http://archive.ubuntu.com/ubuntu bionic-updates Release
404 Not Found [IP: 91.189.88.24 80]
Err:8 http://archive.ubuntu.com/ubuntu bionic-backports Release
404 Not Found [IP: 91.189.88.24 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Failed to update the package cache: Some files could not be downloaded:
failed to run apt update
Check that the sources on your host are configured correctly.
An error occurred when trying to execute 'sudo -i env SNAPCRAFT_HAS_TTY=True snapcraft refresh' with 'multipass': returned exit code 2.
```
On subsequent runs:
```
Launching a VM.
snap "snapd" has no updates available
snap "core18" has no updates available
snap "snapcraft" has no updates available
mount failed: Error enabling mount support in 'snapcraft-test-httplab-dobs'
An error occurred with the instance when trying to mount with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
```
I've confirmed that multipass is running, though unclear how to confirm that it's set up "correctly."
Based on others' incidents I attempted to run `snapcraft clean`, the result was the following:
```
Sorry, an error occurred in Snapcraft:
module 'os' has no attribute 'sched_getaffinity'
Traceback (most recent call last):
File "/usr/local/bin/snapcraft", line 8, in <module>
sys.exit(run())
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/cli/_command.py", line 87, in invoke
return super().invoke(ctx)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/cli/lifecycle.py", line 338, in clean
lifecycle.clean(project, parts, steps.PRIME)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/lifecycle/_clean.py", line 198, in clean
config = project_loader.load_config(project)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/__init__.py", line 47, in load_config
return Config(project)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/_config.py", line 212, in __init__
self.data = self._expand_env(snapcraft_yaml)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/_config.py", line 335, in _expand_env
snapcraft_global_environment(self.project)
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/_env.py", line 110, in snapcraft_global_environment
"SNAPCRAFT_PARALLEL_BUILD_COUNT": str(project.parallel_build_count),
File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/project/_project_options.py", line 135, in parallel_build_count
return len(os.sched_getaffinity(0))
AttributeError: module 'os' has no attribute 'sched_getaffinity'
We would appreciate it if you created a bug report at
https://launchpad.net/snapcraft/+filebug with the above text included.
You can find the traceback in file '/var/folders/8t/bcy9yfg90c56_4m_36wmtyrm0000gp/T/tmp4o1p110g/trace.txt'.
```
Which led me here.
Evaluation history
No evaluation history available.