Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provision: Improve error messaging when attempting to use Ubuntu Trusty. #12688

Closed

Conversation

whoodes
Copy link
Collaborator

@whoodes whoodes commented Jul 1, 2019

As part of dropping support, we add appropriate error messaging when a
user attempts to provision while using trusty. If the user is running
in Vagrant we append information on how to proceed.

Testing Plan:
With bionic in place of trusty.

Sample output:

(zulip-py3-venv) vagrant@ubuntu-bionic:~/zulip$ ./tools/provision
CRITICAL:root:Unsupported platform: Ubuntu bionic

Ubuntu Trusty reached end-of-life upstream and is no longer a supported platform for Zulip
It's recommended to run `vagrant destroy`, and rebuild the VM.

See: https://zulip.readthedocs.io/en/latest/development/setup-vagrant.html

Provisioning failed!

* Look at the traceback(s) above to find more about the errors.
* Resolve the errors or get help on chat.
* If you can fix this yourself, you can re-run tools/provision at any time.
* Logs are here: zulip/var/log/provision.log

try:
# This is a bit of a hack to check for Vagrant, as it's possible (although uncommon) to
# connect to a Vagrant box as a different user.
if subprocess.check_call(["grep", "-q", "^vagrant:", "/etc/passwd", ]) == 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This throws an exception if there’s no match. You meant subprocess.call. But how about os.path.exists('/home/vagrant') instead?

@whoodes whoodes force-pushed the improve-trusty-provision-error-messaging branch 2 times, most recently from 9eb333e to 3414c50 Compare July 1, 2019 23:41
As part of dropping support, we add appropriate error messaging when a
user attempts to provision while using trusty.  If the user is running
in Vagrant we append information on how to proceed.
@whoodes whoodes force-pushed the improve-trusty-provision-error-messaging branch from 3414c50 to 17c3286 Compare July 1, 2019 23:43
@timabbott
Copy link
Sponsor Member

Merged, after editing the text, in 4022717. Thanks @whoodes!

@timabbott timabbott closed this Jul 3, 2019
@whoodes whoodes deleted the improve-trusty-provision-error-messaging branch July 4, 2019 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants