Skip to content

Ignore errors from ps #260

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

Merged
merged 1 commit into from
Nov 9, 2016
Merged

Ignore errors from ps #260

merged 1 commit into from
Nov 9, 2016

Conversation

snh
Copy link
Member

@snh snh commented Oct 27, 2016

Some implementations of ps lack support for the -o option as used by share/github-backup-utils/ghe-detect-leaked-ssh-keys. This leads to errors such as the following:

$ bin/ghe-backup
Starting backup of XXXXXX in snapshot XXXXXX
Connect XXXXXX:122 OK (v2.7.4)
Backing up GitHub settings ...
Backing up SSH authorized keys ...
Backing up SSH host keys ...
Backing up MySQL database ...
Backing up Redis database ...
Backing up audit log ...
Backing up hookshot logs ...
Backing up Git repositories ...
Backing up GitHub Pages ...
Backing up asset attachments ...
Backing up storage data ...
Backing up hook deliveries ...
Backing up custom Git hooks ...
Backing up Elasticsearch indices ...
Pruning 1 failed snapshot(s) ...
Completed backup of XXXXXX:122 in snapshot XXXXXX at XXXXXX
Checking for leaked ssh keys ...
ps: unknown option -- o
Try `ps --help' for more information.

As this ps is only used to determine the parent process for purposes of customising the output message, it is safe to ignore this error in the rare instances -o support is missing, as a generic output message will be used instead should leaked keys be found.

/cc @github/backup-utils

@snh snh added the bug label Oct 27, 2016
@rubiojr rubiojr merged commit 5e69b4e into master Nov 9, 2016
@rubiojr rubiojr deleted the snh/pserror branch November 9, 2016 14:08
rubiojr added a commit that referenced this pull request Nov 9, 2016
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.

2 participants