Bug 1445631
| Summary: | [downstream clone - 4.1.2] [backup] Engine backup stages to /tmp, can fill disk to 100% and down rhv-m | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | rhev-integ |
| Component: | ovirt-engine | Assignee: | Yedidyah Bar David <didi> |
| Status: | CLOSED ERRATA | QA Contact: | Aleksei Slaikovskii <aslaikov> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.0.6 | CC: | asdavis, jspanko, lsurette, melewis, pstehlik, rbalakri, Rhev-m-bugs, srevivo, ykaul, ylavi |
| Target Milestone: | ovirt-4.1.3 | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
With this update, the user can now control the location of the temporary directory that the engine-backup command creates. The command line option --tmpdir=DIR and the variable $TMPDIR have been added to control the location of the temporary directory. Previously, the engine-backup command always used /tmp. If /tmp was full, or close to being full, it was not possible to tell the engine-backup command to use a different directory. Now, it is possible to run the engine-backup command even if the /tmp directory is full by telling the engine-backup command to use a different location.
|
Story Points: | --- |
| Clone Of: | 1439332 | Environment: | |
| Last Closed: | 2017-07-06 07:30:42 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Integration | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1439332 | ||
| Bug Blocks: | |||
|
Description
rhev-integ
2017-04-26 07:53:31 UTC
Changing temp dir is already possible. engine-backup honor system temporary folder defined in $TMPDIR. If a different tmpdir is needed, a TMPDIR=/path/to/tmpdir engine-backup <args> should be enough. Is this enough or do we still need to consider to set TMPDIR to dirname of --file argument? (Originally by Sandro Bonazzola) The feedback I'm getting is that because it's not obvious that tmp dir is configurable, it would be better to have it default to staging at the target directory, with an option to stage in local /tmp. (Originally by Ashton Davis) (In reply to Sandro Bonazzola from comment #1) > Changing temp dir is already possible. engine-backup honor system temporary > folder defined in $TMPDIR. Actually it does not, due to the fix for bug 1172191. If you want to workaround this, and know that your environment is otherwise clean, you can do something like that: BACKUP_ENV_CLEAN=1 TMPDIR=/var/tmp engine-backup --mode=backup --file=f1 --log=l1 (In reply to Ashton Davis from comment #2) > The feedback I'm getting is that because it's not obvious that tmp dir is > configurable, This can also be handled as a documentation bug, if it worked. > it would be better to have it default to staging at the target > directory, with an option to stage in local /tmp. Please note that there is no "target directory". Only a "target file". These are in principle very different. E.g., the following: cd /root ln -s /tmp/f1 f1 engine-backup --file=f1 --log=l1 --mode=backup will keep /root/f1 a symlink, and the actual archive will thus be written to /tmp/f1. So in such a case, which is the "target directory"? "/root", or "/tmp"? And should it be engine-backup that decides about this (perhaps based on our current discussion), or we need yet another option ("--follow-symlinks-when-deciding-about-tmpdir") to allow the user to choose? (Originally by didi) How about simply having a new option --tmpdir=/some/temp/dir, which will default to $TMPDIR if set, or to /tmp otherwise? To make it clear - it will behave like /tmp. That is, it must exist, and be a directory, before engine-backup starts, and engine-backup will not delete it. This is to prevent cases like bug 1288197 and bug 1199147. (Originally by didi) (In reply to Yedidyah Bar David from comment #4) > How about simply having a new option --tmpdir=/some/temp/dir, which will > default to $TMPDIR if set, or to /tmp otherwise? > Seems like the most straight forward option. (Originally by Yaniv Dary) *** Bug 1415623 has been marked as a duplicate of this bug. *** (Originally by Sandro Bonazzola) (In reply to Yaniv Dary from comment #5) > (In reply to Yedidyah Bar David from comment #4) > > How about simply having a new option --tmpdir=/some/temp/dir, which will > > default to $TMPDIR if set, or to /tmp otherwise? > > > > Seems like the most straight forward option. I concur, this makes the most sense. It seems to both get around the target file -vs- dir issue, and still gives the user choice for where to stage the transfer. (Originally by Ashton Davis) Verified on ovirt-engine-4.1.3.2-0.1.el7.noarch # engine-backup --help | grep tmpdir --tmpdir=DIR Set temporary directory parent. See also mktemp(1). # mkdir /var/backup_tmpdir # engine-backup --tmpdir=/var/backup_tmpdir --mode=backup --file=backup --log=backup.log Backing up: Notifying engine - Files - Engine database 'engine' - DWH database 'ovirt_engine_history' Packing into file 'backig' Notifying engine Done. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1692 sync2jira sync2jira sync2jira sync2jira |