Project

General

Profile

Bug #39628

Fix function for storing SIDs

Added by John Hixson 11 months ago. Updated 10 months ago.

Status:
Done
Priority:
No priority
Assignee:
Andrew Walker
Category:
Services
Target version:
Seen in:
Severity:
High
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Observed on customer box that a cifs.save() call was not removed when migrated to middleware. This crashes the script and prevents smb4.conf from being generated. This is a one line change and should go into both 11.2 and 11.1-U6.

Jul 24 10:13:12 nv-nas3 ActiveDirectory: /usr/local/bin/python /usr/local/bin/midclt call notifier.start cifs
Jul 24 10:13:16 localhost [generate_smb4_conf:178] The following exception occured while trying to set database SID: 'Struct' object has no attribute 'save'
Jul 24 10:13:16 localhost [generate_smb4_conf:12] Traceback (most recent call last):
Jul 24 10:13:16 localhost [generate_smb4_conf:12] File "/usr/local/libexec/nas/generate_smb4_conf.py", line 173, in smb4_set_database_SID
Jul 24 10:13:16 localhost [generate_smb4_conf:12] cifs.save()
Jul 24 10:13:16 localhost [generate_smb4_conf:12] AttributeError: 'Struct' object has no attribute 'save'
Jul 24 10:13:16 localhost [generate_smb4_conf:178] The following exception occured while trying to set database SID: 'Struct' object has no attribute 'save'
Jul 24 10:13:16 localhost [generate_smb4_conf:12] Traceback (most recent call last):
Jul 24 10:13:16 localhost [generate_smb4_conf:12] File "/usr/local/libexec/nas/generate_smb4_conf.py", line 173, in smb4_set_database_SID
Jul 24 10:13:16 localhost [generate_smb4_conf:12] cifs.save()
Jul 24 10:13:16 localhost [generate_smb4_conf:12] AttributeError: 'Struct' object has no attribute 'save'


Related issues

Related to FreeNAS - Bug #28063: Write local SID to correct DB fileDone

History

#1 Updated by John Hixson 11 months ago

  • Assignee changed from Release Council to Andrew Walker

Andrew, can you fix this? cifs.save() will need to be replaced with with the equivalent new world order method of saving this value to the database.

#2 Updated by Dru Lavigne 11 months ago

  • Target version changed from 11.2-RC2 to 11.1-U6

#3 Updated by Andrew Walker 11 months ago

#4 Updated by Andrew Walker 11 months ago

#5 Updated by Dru Lavigne 11 months ago

  • Related to Bug #28063: Write local SID to correct DB file added

#6 Updated by Dru Lavigne 11 months ago

#7 Updated by Andrew Walker 11 months ago

Method to test:
1) clear sid from freenas-v1.db

sqlite3 /data/freenas-v1.db 'UPDATE services_cifs SET cifs_SID = "";'

2) run the smb4.conf generation script
/usr/local/libexec/nas/generate_smb4_conf.py

3) Verify that the SID was written to the db file correctly
sqlite3 /data/freenas-v1.db "SELECT cifs_SID from services_cifs;"

#8 Updated by Dru Lavigne 11 months ago

  • Status changed from Unscreened to In Progress

#10 Updated by Dru Lavigne 11 months ago

  • Subject changed from remove leftover save() method from generate_smb4_conf.py to Fix function for storing SIDs
  • Status changed from In Progress to Ready for Testing
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#12 Updated by Bonnie Follweiler 10 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Test Passed

#13 Updated by Dru Lavigne 10 months ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF