Page MenuHomePhabricator

Should we skip some directories from deploy backups?
Open, LowPublic

Description

I was checking for backup errors and saw a long list of errors from deploy2002:

17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/249eca42b7ef8829f383e95307d06debb0060d8e25933e30992acbd7c8b1447d": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/98119e366fbde478cdeb2cc31bcd03bf8ba500a39dc15bde519d077989c6dab4": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/82539cce2d4e06b85b30c0f6c630fa6d5d24797c27d41b6dbc3413988219fd0c": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/44649b3765339d204c0d26174b8abcba2d37eb768cd302a82275d88677323ad3": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/312cf6cbbc3032cb0d4fb9a0f58caba13d8a7ef9635f7996a3cccd0c195bc337": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/bc677a1eabe0218aed103888b72b537f3b668bcb9a104bd52298543808e023ec": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/0fa3cbcd37ae85f132810e91b00d191566d39465d875eb90f6a83c79c08549d2": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/2242689dcba258b8d9c5469b1a49c20f8113c8c86118f26223fd48d0e30335df": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/c87e43e1cad898db6c1a6a23862677ea4d714fe644d3d9cff99066876bb60974": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/88ad31531eee49e3842147a16babdeee3b76a07fe3f411672fe83259ef2ab6b4": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/86ebd2a19b1b7410a1c5e6663d6aac047c7e29f33eafa2ad4170c41aa06da057": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/a44b1b93957396433a5f160c43099659c6065a426fd4f8b5f2ad19e3bcc50656": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/9176ec6ea5697cd1ab65824603a77895bae7acb59787c40ccc103d5543d3997a": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/a700fa7c622f350b356e2619d0d9552b65c70b279ac5bcfb707d9242baca136f": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/ea153ad812f605dbdd5619fcfc8a32421e093b2cdeba3383ae0b68a5e218c2d9": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/4e15446a860a11b760362cc8c35753042b43d8373e766afac45a0f76d0aff621": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/9d408635ed31d8e7fd3ebe00e98b5c73f2dbe9905bdf031157f92d5516ea2b7e": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/ec8fe52dc423ffe69a3cd37d7e383564819ee934059488809b178317f194b928": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/2f786da550babb91d1f1c4a28920ba543bbf13f3dc03b4ea4011c6ed0a7eb538": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/bf6935ddf4f74d771e1059e22456ca5f244124ee11777e63919837c61054bc66": ERR=No such file or directory
17-Mar 04:39 deploy2002.codfw.wmnet-fd JobId 688598:      Could not stat "/srv/docker/overlay2/e0b86a2b3ca01a32ccf6d7db2c7d3f8f042dcec62c117c73d02ee18a299edfa7": ERR=No su:
...

This is just an excerpt, and I thought it was more recent of frequent, but it only dates to one month ago. If it is a one time thing, it can be ignored, but I wonder if it is trying to backup temporary files that are not useful (?). Let me know, this is not an issue, but I wanted to give a heads up in case it is unintended, to avoid log noise or loss of backups. This is just a warning and doesn't make the backups fail, just FYI, and saying "please ignore" would be a valid resolution, a few of these are normal as backups concurrent with file modifications are a known limitation.

Event Timeline

CC @hashar in case it is interesting for releng, but this looks more infra and serviceops related (k8s).

• Scott_French subscribed.

Thanks for raising this.

So, /srv/docker/ is the docker data-root, and will generally contain temporary files which I believe we generally do not want / need to back up. In that sense, these can be ignored.

That, said it looks like the srv-deployment fileset used on the deployment host is literally all of /srv/. I'm wondering if there should be /srv/docker/ exclusion, similar to contint.

MLechvien-WMF removed a project: SRE.

Let me know, fileset definition for bacula has very easy ways to include and exclude directories, and I can add any rule very quickly, but only if you feel comfortable it won't miss anything important.

For example: https://phabricator.wikimedia.org/source/operations-puppet/browse/production/modules/profile/manifests/backup/filesets.pp;42653bf651305349abe3681decaff207071f3daa?as=source&blame=off#L62

I will send tomorrow a proposal, adding that exclude and you can decide on the gerrit review.

Thanks, @jcrespo!

It seems a little surprising to me that we've not already excluded this path, so I'm wondering if there's some historical context that led to this being a conscious / intentional choice. I'll ask around in the meantime.

Change #1273676 had a related patch set uploaded (by Jcrespo; author: Jcrespo):

[operations/puppet@production] backup: Ignore /srv/docker from srv-deployment backups, move cluster mgmt

https://gerrit.wikimedia.org/r/1273676

Change #1273676 merged by Jcrespo:

[operations/puppet@production] backup: Ignore /srv/docker from srv-deployment backups, move cluster mgmt

https://gerrit.wikimedia.org/r/1273676

@Scott_French would it be possible to schedule with someone in your team a recovery test, around a 2 weeks to 1 month from now, to double check we are able to recover data as needed, and make sure we are backing up everything we need? I think that would be my only pre-requisite for resolving this (scheduling the test).

Thanks for updating the fileset @jcrespo.

Some manner of restore test sounds reasonable - e.g., restoring /srv from backup on a non-primary deployment host. If we do so, we'll still want to avoid conflicting with deployments, due to the rsyncs that run between hosts at the tail end of the deployment (and touch various /srv subdirectories).

How challenging would it be to restore to a different host than the one from which the backup was taken? The reason I ask is that I'm wondering whether there's any value in doing this as part of putting deploy2003 into production, which should happen this quarter.

In any case, I'll flag this with our team to try to find someone who may have cycles to assist.

How challenging would it be to restore to a different host than the one from which the backup was taken?

Not challenging at all, but it requires stopping puppet on the recovery client while the recovery is ongoing.

we discussed this today and @Raine should be able to assist on this test

@jcrespo just to keep you updated: I have a few prerequisites to deal with before I'm able to prepare the new deploy host, but I'm keeping this in mind and will ping you when I get to that point.

I believe Raine has this on their radar so assigning to them for easier updates