#7952 ipa-backup file logging does not work
Closed: fixed 4 years ago by rcritten. Opened 4 years ago by rcritten.

Issue

When an error occurs ipa-backup reports:

The ipa-backup command failed. See /var/log/ipabackup.log for more information.

That file may not exist yet I suppose if things failed early enough. I can't tell yet whether it isn't created yet or it is ignored entirely.

Also if --log-file is used then that name is not returned on errors.

Version/Release/Distribution

ipa-server-4.7.1-11.module+el8+2842+7481110c on RHEL 8.


OK, confirmed that some errors may occur before the log is created.

e.g.

# GNUPGHOME=/root/doesnotexist ipa-backup --gpg  --log-file /tmp/foo

Metadata Update from @rcritten:
- Issue assigned to rcritten

4 years ago

Metadata Update from @rcritten:
- Issue set to the milestone: FreeIPA 4.7.3

4 years ago

Before validation python logging is setup with no file logging, probably a good idea.

The problem is that the code that displays the message goes by whether log_file_name is set in the class, regardless of whether it was configured or not. Proposed solution: use a temporary value to hold the name while validation is done.

master:

  • 10b721d admintool: don't display log file on errors unless logging is setup

ipa-4-7:

  • 4f6152a admintool: don't display log file on errors unless logging is setup

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata