#6843 ipa-backup does not create log file at /var/log/
Closed: fixed Opened 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

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

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 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

https://github.com/freeipa/freeipa/pull/1893

master:

  • 648d7c0d38ef99196531e94cd9803c630e7fb05c 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)

ipa-4-6:

  • af2ee7ae345037a30164043bddb247b2bbeb60b6 ipa commands: print 'IPA is not configured' when ipa is not setup
  • 95af5dc29ff775296d34cc5dc9260105457e0c80 Test: test ipa-* commands when IPA is not configured
  • 9182917280a5c2590fa677729db54b38a9ac4d1f Disable message about log in ipa-backup if IPA is not configured

master:

  • 402246a72990f77591f5efaec7ff0bc0cf82f416 ipapython/admintool.py: use SERVER_NOT_CONFIGURED

ipa-4-8:

  • fa08e9618feb019227a3d340ec11f503fa1a5d6a ipapython/admintool.py: use SERVER_NOT_CONFIGURED

master:

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

ipa-4-8:

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

ipa-4-7:

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

master:

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