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

Copy all the provision output in a log file #1809

Merged
merged 17 commits into from May 17, 2019

Conversation

Projects
None yet
2 participants
@Mte90
Copy link
Contributor

commented May 15, 2019

In this way the log is more simple to read and share.

@Mte90 Mte90 requested a review from tomjn May 15, 2019

@Mte90 Mte90 referenced this pull request May 15, 2019

Closed

silent apt commands #27

@tomjn

This comment has been minimized.

Copy link
Member

commented May 15, 2019

I'd rather redirect these somewhere than silence them. Otherwise debugging issues would become extremely difficult, especially considering some of the issues being actively debugged are relying on the output of those commands to test things. We should never silence things but instead redirect their output to log files

@Mte90

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2019

What do you think of a file in /vagrant/log/vvv/log-[date].log?

@Mte90 Mte90 self-assigned this May 15, 2019

@tomjn

This comment has been minimized.

Copy link
Member

commented May 15, 2019

@Mte90 I'd like a new mounted folder /var/log/provisioners/ then have a new file for each provision. We can clean up any files older than a week. The file names should follow the Vagrant provisioner names, e.g. provisioner-default.log or provisioner-utility-core-tls-ca.log, with a suitable timestamp/date.

Perhaps it can be in a subfolder with a timestamp for when the provision started? We can set a file up in /vagrant that has the time the provision began that can then be used

@Mte90

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2019

Ok I will try to work on that in the next days.

@Mte90 Mte90 force-pushed the Mte90:silent_apt branch from bbbb7a1 to 14a6272 May 17, 2019

@Mte90

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2019

This is working, creates a new file in a folder.

@Mte90 Mte90 changed the title Silent some install step Copy all the provision output in a log file May 17, 2019

tomjn added some commits May 17, 2019

@tomjn

This comment has been minimized.

Copy link
Member

commented May 17, 2019

@Mte90 I made some changes:

  • it now logs to a folder so that each provisions logs are all co-located
  • I put a provisioned_at file in /vagrant so that they all have the same timestamp, otherwise they'd be stagged as each provisioner runs one after another with a greater timestamp ( also handy for the dashboard to remind users when they last reprovisioned )
  • I added the log snippet to the other core provisioners so we get utilities/sites logged too

Needs testing though

@Mte90 Mte90 force-pushed the Mte90:silent_apt branch from 0e57209 to cbd54aa May 17, 2019

@Mte90

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2019

I force pushed because my version is better and working on creating the folder and later the file without issues

tomjn added some commits May 17, 2019

@tomjn

tomjn approved these changes May 17, 2019

@tomjn tomjn merged commit e47aff1 into Varying-Vagrant-Vagrants:develop May 17, 2019

@tomjn tomjn added this to the 3.x.x milestone May 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.