This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2038948 - amreport, amdump hang due to missing /etc/amanda/DailySet1/command_file, which amandabackup user cannot create
Summary: amreport, amdump hang due to missing /etc/amanda/DailySet1/command_file, whic...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: amanda
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Pavel Cahyna
QA Contact: CS System Management SST QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-10 15:48 UTC by Dan Astoorian
Modified: 2023-09-21 22:08 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-21 22:08:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-6844 0 None Migrated None 2023-09-21 22:08:09 UTC
Red Hat Issue Tracker RHELPLAN-107306 0 None None None 2022-01-10 15:49:29 UTC

Description Dan Astoorian 2022-01-10 15:48:04 UTC
Description of problem:
As shipped, Amanda cannot perform dumps due to the amandabackup user not having permission to create the file /etc/amanda/DailySet1/commmand_file.  Commands such as amreport or amdump loop trying to create the file once per second until a writable command_file is created (or until the amandabackup user is given write permission to the /etc/amanda/DailySet1/ directory).

Version-Release number of selected component (if applicable):
amanda-3.5.1-13.el8.x86_64
amanda-server-3.5.1-13.el8.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install the packages via "dnf install amanda-server amanda-client".
2. As the amanadabackup user, attempt to initiate a backup via "amdump DailySet1".  (Since no backup has been configured, this will produce the message "Can't open tape device /dev/YOUR-TAPE-DEVICE-HERE: No such file or directory" and a prompt to enter ^D to abort, but this is irrelevant to this issue--the same thing happens if a DLE has been configured.)
3. Run "strace -p $(pgrep planner)" to trace system calls of the planner process.  Observe that it's looping trying to create /etc/amanda/DailySet1/command_file and getting "permission denied" errors.
4. Hit Ctrl-C twice to abort the amdump process.  Observe that running "amreport DailySet1" also hangs, and running "strace amreport DailySet1)" similarly shows repeated failed attempts to create /etc/amanda/DailySet1/command_file .

Actual results:
The planner and amdump processes loop, and /var/log/amanda/server/DailySet1/ will contain planner*, driver*, and amreport* logs containing repeated entries such as:

/var/log/amanda/server/DailySet1/amreport.20220110095258.debug:Mon Jan 10 09:53:02.989265035 2022: pid 2042915: thd-0x5573ebaf1600: amreport: file_lock_lock open failed (/etc/amanda/DailySet1/command_file): Permission denied
/var/log/amanda/server/DailySet1/amreport.20220110095258.debug:Mon Jan 10 09:53:03.989382629 2022: pid 2042915: thd-0x5573ebaf1600: amreport: file_lock_lock open failed (/etc/amanda/DailySet1/command_file): Permission denied
/var/log/amanda/server/DailySet1/amreport.20220110095258.debug:Mon Jan 10 09:53:04.989465466 2022: pid 2042915: thd-0x5573ebaf1600: amreport: file_lock_lock open failed (/etc/amanda/DailySet1/command_file): Permission denied


Expected results:
The Amanda processes should not hang; e.g., pressing Ctrl-D when prompted with "enter ^D to abort" by amdump should cause the amdump process to exit within a few seconds.

Additional info:
Creating the file /etc/amanda/DailySet1/command_file and chown'ing it to the amandabackup user (even after the Amanda commands have been started) will allow Amanda to proceed.  Chown'ing the /etc/amanda/DailySet1/ directory to the amandabackup user also works, but the amandabackup user should probably not have write access to the configuration directory without a compelling reason.

Note that this problem did not affect Red Hat Enterprise Linux 7, as the command_file mechanism was introduced after the version of Amanda that was shipped with that release (amanda-3.3.3).

Including an empty /etc/amanda/DailySet1/command_file file with appropriate permissions in the amanda-server package as a configuration file may be adequate to remedy the issue.

It's not clear to me why the Amanda authors chose to locate the command_file file in the configuration directory rather than, e.g., /var/lib/amanda/DailySet1/ (which would already have appropriate permissions), since the amandabackup user does not typically modify any other files in the configuration directories, but that decision may be beyond the scope of this report.

Comment 1 Pavel Cahyna 2022-01-11 11:49:58 UTC
Thank you for the report and analysis, I will first check what do other distributions do about this problem (if anything).

Comment 3 RHEL Program Management 2023-09-21 21:31:26 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-21 22:08:16 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.