Project

General

Profile

Bug #25470

Don't run net commands until smb4.conf exists

Added by John Litster over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
John Hixson
Category:
OS
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I just upgraded from FreeNAS-9.10.2-U5 to FreeNAS-9.10.2-U6 needless to say, I was surprised about the non-warned reboot (but whatever)
I noticed it was taking a really long time to reboot.
I went and attached a monitor and keyboard to it and on the screen it said (it stopped here)

"Can't load /usr/local/etc/smb4.conf - run testparm to debug it"

I restarted in U5, updated again, same result.
So I ran testparm /usr/local/etc/smb4.conf
here are the results:
  1. testparm /usr/local/etc/smb4.conf
    Load smb config files from /usr/local/etc/smb4.conf
    Processing section "[SharepointTarget]"
    Processing section "[VideoStore]"
    Processing section "[vRangerBackup]"
    Loaded services file OK.
    WARNING: You have some share names that are longer than 12 characters.
    These may not be accessible to some older clients.
    (Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
    Server role: ROLE_DOMAIN_MEMBER

Press enter to see a dump of your service definitions

  1. Global parameters
    [global]
    dos charset = CP437
    realm = MyDomain.LOCAL
    server string = FreeNAS Server
    workgroup = MyDomain
    domain master = No
    lm announce = Yes
    local master = No
    preferred master = No
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    client ldap sasl wrapping = plain
    logging = file
    max log size = 51200
    cache directory = /var/tmp/.cache/.samba
    kernel change notify = No
    panic action = /usr/local/libexec/samba/samba-backtrace
    pid directory = /var/run/samba
    disable spoolss = Yes
    load printers = No
    printcap name = /dev/null
    server min protocol = SMB2
    allow trusted domains = No
    map to guest = Bad User
    obey pam restrictions = Yes
    security = ADS
    server role = member server
    deadtime = 15
    hostname lookups = Yes
    max open files = 1883306
    template shell = /bin/sh
    winbind cache time = 7200
    winbind enum groups = Yes
    winbind enum users = Yes
    winbind offline logon = Yes
    winbind refresh tickets = Yes
    winbind use default domain = Yes
    dns proxy = No
    idmap config myDomain: range = 20000-90000000
    idmap config myDomain: backend = rid
    idmap config *: range = 90000001-100000000
    idmap config * : backend = tdb
    store dos attributes = Yes
    strict locking = No
    directory name cache size = 0
    dos filemode = Yes
    acl allow execute always = Yes
    ea support = Yes
    create mask = 0666
    directory mask = 0777

[SharepointTarget]
path = /mnt/SharepointBackup
veto files = /.snapshot/.windows/.mac/.zfs/
read only = No
vfs objects = zfs_space zfsacl streams_xattr aio_pthread
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special

[VideoStore]
path = /mnt/VideoStorage
veto files = /.snapshot/.windows/.mac/.zfs/
read only = No
vfs objects = zfs_space zfsacl streams_xattr aio_pthread
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special

[vRangerBackup]
path = /mnt/vRangerBackups/vRangerBackup
veto files = /.snapshot/.windows/.mac/.zfs/
read only = No
vfs objects = zfs_space zfsacl streams_xattr aio_pthread
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special
[root@G1PPFreeNas01] ~#

The link to the forum discussion is: https://forums.freenas.org/index.php?threads/cant-load-smb4-conf.56728/#post-398092

20170803_155025.jpg (3.4 MB) 20170803_155025.jpg John Litster, 08/10/2017 07:59 AM
ix-pre-samba (1.25 KB) ix-pre-samba John Litster, 08/11/2017 12:44 PM
ix-pre-samba (1.22 KB) ix-pre-samba John Litster, 08/11/2017 12:46 PM
12087

Associated revisions

Revision 2814ff7e (diff)
Added by John Hixson over 3 years ago

Don't run any net commands before smb4.conf exists Ticket: #25470

Revision 7bba58ac (diff)
Added by John Hixson over 3 years ago

Don't run any net commands before smb4.conf exists Ticket: #25470 (cherry picked from commit 2814ff7e8521f7a64ace0243bcc4a4bed78409f4)

Revision 40193ed6 (diff)
Added by John Hixson over 3 years ago

Don't run any net commands before smb4.conf exists Ticket: #25470

History

#1 Updated by Dru Lavigne over 3 years ago

  • Assignee changed from Release Council to John Hixson

#2 Updated by John Hixson over 3 years ago

  • Status changed from Unscreened to Screened
  • Target version set to 11.1

#3 Updated by John Hixson over 3 years ago

  • Status changed from Screened to 15

Can you attach a debug? system->advanced->save debug

#4 Updated by John Litster over 3 years ago

  • File debug-G1PPFreeNas01-20170808113642.tgz added

As requested

#5 Updated by Dru Lavigne over 3 years ago

  • Private changed from No to Yes

#6 Updated by John Hixson over 3 years ago

I'm not seeing any issues in your logs. Samba is running, you're connected to AD, and users & groups are available. What behavior are you witnessing ?

#7 Updated by John Litster over 3 years ago

like I said in the beginning:
I just upgraded from FreeNAS-9.10.2-U5 to FreeNAS-9.10.2-U6 needless to say, I was surprised about the non-warned reboot (but whatever)
I noticed it was taking a really long time to reboot.
I went and attached a monitor and keyboard to it and on the screen it said (it stopped here)

"Can't load /usr/local/etc/smb4.conf - run testparm to debug it"

basicly.... it would just sit there until I hit CTRL+X.....then it continues it's reboot

#8 Updated by John Litster over 3 years ago

12087

I forgot I had a picture of where the booting process stops until I hit CTRL+X

#9 Updated by John Hixson over 3 years ago

  • Status changed from 15 to Needs Developer Review
  • Assignee changed from John Hixson to Release Council
  • Priority changed from No priority to Nice to have
  • Target version changed from 11.1 to 11.0-U3

There is actually nothing going on here out of the ordinary, other than a message that is a red herring. During boot, the command "net getlocalsid" is ran to determine SID, but smb4.conf isn't generated yet, thus generating the warning. The smb4.conf file is generated shortly afterward and everything is fine. I've commited a fix in 2814ff7e8521f7a64ace0243bcc4a4bed78409f4 to not run this command when smb4.conf doesn't exist.

Fixed in 2814ff7e8521f7a64ace0243bcc4a4bed78409f4
pull request: https://github.com/freenas/freenas/pull/269

#10 Updated by Dru Lavigne over 3 years ago

  • Assignee changed from Release Council to Timur Bakeyev

#11 Updated by John Litster over 3 years ago

where do I find that file location to make that change to?

#12 Updated by Timur Bakeyev over 3 years ago

In general, you'd better wait until the change will appear in your distribution. But if you are not afraid to touch the system with bare hands the file in question is /conf/base/etc/ix.rc.d/ix-pre-samba.

#13 Updated by Timur Bakeyev over 3 years ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from Timur Bakeyev to Release Council

Looks good to me

#14 Updated by John Litster over 3 years ago

#15 Updated by John Litster over 3 years ago

#16 Updated by Dru Lavigne over 3 years ago

  • Assignee changed from Release Council to John Hixson

#17 Updated by Dru Lavigne over 3 years ago

  • File deleted (debug-G1PPFreeNas01-20170808113642.tgz)

#18 Updated by Dru Lavigne over 3 years ago

  • Private changed from Yes to No

#19 Updated by Vaibhav Chauhan over 3 years ago

  • Status changed from Reviewed by Developer to 47

#20 Updated by Dru Lavigne over 3 years ago

  • Subject changed from can't load smb4.conf to Don't run net commands until smb4.conf exists

#21 Updated by Joe Maloney over 3 years ago

  • Status changed from 47 to Ready For Release
  • Needs QA changed from Yes to No
  • QA Status Test Passes added
  • QA Status deleted (Not Tested)

After removing smb4.conf I can verify that "Can't load /usr/local/etc/smb4.conf - run testparm to debug it" no longer appears.

#22 Updated by Vaibhav Chauhan over 3 years ago

  • Status changed from Ready For Release to Resolved

Also available in: Atom PDF