#8115 Nightly test failure in fedora-30/test_smb and fedora-29/test_smb
Closed: fixed by sorlov. Opened by frenaud.

Issue

The nightly test test_integration/test_smb.py is failing on the master branch in the following tests:
- TestSMB::()::test_smb_mount_and_access_by_different_users
- TestSMB::()::test_samba_reinstall

In both cases the error is:

transport.py               318 INFO     RUN ['su', '-l', 'user2', '-c', 'kdestroy -A']
transport.py               513 DEBUG    RUN ['su', '-l', 'user2', '-c', 'kdestroy -A']
transport.py               558 DEBUG    kdestroy: Permission denied while initializing krb5
transport.py               217 DEBUG    Exit code: 1
host.py                    125 ERROR    stderr: kdestroy: Permission denied while initializing krb5

Steps to Reproduce

  1. Launch the test test_integration/test_smb.py

Logs:
- On fedora 30, PR #3865, logs
- On fedora 29, PR #3862, logs

Last successful run was on Nov 01, first failure Nov 05. The commits between these dates were:
560acf3 Skip commented lines after substitution
bc56642 Block camellia in krbenctypes update in FIPS
f16c08b ipatests: in DNS zone file add A record for name server
b10e43c ipatests: strip newline character when getting name of temp file
09d5b93 Enable AES SHA 256 and 384-bit enctypes in Kerberos
14be271 ipatests: add test to check that only TLS 1.2 is enabled in Apache
73796c7 Fixes debian path for IPA_CUSTODIA_HANDLER


Metadata Update from @frenaud:
- Issue tagged with: test-failure

The previous test (test_smb_access_for_ad_user_at_ipa_client) is calling the fixture enable_smb_client_dns_lookup_kdc:
- mktemp (to create a temp file)
- cp /etc/krb5.conf to the temp file
- ...
- mv tempfile /etc/krb5.conf
This flow looses the file permissions, because mktemp creates a file using the default umask, which results in -rw------- permissions. The copy does not modify the permissions, and the mv keeps the permissions from the source => /etc/krb5.conf now has -rw-------.

The issue did not happen before because of a bug in create_temp_file that was fixed by b10e43c ipatests: strip newline character when getting name of temp file.

Metadata Update from @frenaud:
- Issue assigned to sorlov

master:

  • 72540c42337cacab1dcbf0a4b2b03d59512e7956 ipatests: refactor FileBackup helper
  • c2b230ce64bb7a29572cbfabbd23dd0900c7fce3 ipatests: replace ad hoc backup with FileBackup helper
  • f58fb573d18808343e30a59304c5d3862b4e7e42 ipatests: enable test_smb.py in gating.yaml

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

ipa-4-8:

  • 11ec42a97ccaab9fc799c35e022ca7bd9784385f ipatests: refactor FileBackup helper
  • 48a53527a2d6db81e189aa52697998a96abfd21e ipatests: replace ad hoc backup with FileBackup helper
  • 98f2f8c6bcf70965951862abe6a93c872cada955 ipatests: enable test_smb.py in gating.yaml

ipa-4-7:

  • f92c28da7bbc03c2ef47f0617e8dabbdfd0bf65e ipatests: refactor FileBackup helper
Metadata