#6843 ipa-backup does not create log file at /var/log/
Closed: fixed 4 years ago Opened 5 years ago by pvoborni.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1428690

Description of problem:

I accidentally ran into this issue when I tried to run ipa-backup command on a
machine that was no more an IPA server. Ran the ipa-backup command on the
machine and it failed suitably indicating that IPA server is not configured,
which is fine. It went on to state that more information can be found in
/var/log/ipabackup.log

But no such file was created. See below:

[root@someidm0X ~]# ipa-backup
IPA is not configured on this system.
The ipa-backup command failed. See /var/log/ipabackup.log for more information
[root@someidm0X ~]# ls /var/log/ipabackup.log
ls: cannot access /var/log/ipabackup.log: No such file or directory

Version-Release number of selected component (if applicable):
[root@someidm0X ~]# ipa-server-install --version
4.4.0
[root@someidm0X ~]# ipa-backup --version
4.4.0

How reproducible:
Everytime

Steps to Reproduce:
1. Install the ipa-server packages.
2. Do NOT configure IPA server.
3. Run ipa-backup command.

Actual results:
ipa-backup command fails and reports that /var/log/ipabackup.log contains more
information, even though such a file is not created.

Expected results:
Option 1:
ipa-backup command fails, creates /var/log/ipabackup.log and adds failure
details there.
Option 2:
ipa-backup command fails, does not notify user that more information is
available in /var/log/ipabackup.log

Additional info:
NA

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1428690

5 years ago

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1428690

5 years ago

Can we add below option 3 in expected results?

Expected results:
Option 1:
ipa-backup command fails, creates /var/log/ipabackup.log and adds failure
details there.
Option 2:
ipa-backup command fails, does not notify user that more information is
available in /var/log/ipabackup.log
Option 3:
ipa-backup command fails, notify user that more information is available in <value>, value provided to the parameter --log-file.

In my reproducer , I can see /var/log/ipbackup.log file created when ipa-backup failed( ipa server is installed)

There should be no logging done in case of IPA not being configured. This should just spit out a message and return some unique return value (probably 2 to be consistent with other commands).

Metadata Update from @rcritten:
- Issue assigned to rcritten
- Issue priority set to: low

4 years ago

master:

  • 648d7c0 Disable message about log in ipa-backup if IPA is not configured

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

4 years ago

ipa-4-6:

  • af2ee7a ipa commands: print 'IPA is not configured' when ipa is not setup
  • 95af5dc Test: test ipa-* commands when IPA is not configured
  • 9182917 Disable message about log in ipa-backup if IPA is not configured

master:

  • 402246a ipapython/admintool.py: use SERVER_NOT_CONFIGURED

ipa-4-8:

  • fa08e96 ipapython/admintool.py: use SERVER_NOT_CONFIGURED

master:

  • a71c59c ipatests: Test for ipa-backup with ipa not configured

ipa-4-8:

  • 0010d07 ipatests: Test for ipa-backup with ipa not configured

ipa-4-7:

  • b384b29 ipatests: Test for ipa-backup with ipa not configured

master:

  • 253779a ipatests: fix topology for TestIpaNotConfigured in PR-CI nightly definitions

Login to comment on this ticket.

Metadata