Fog V1.5.9.29 Active Directory Defaults for OU not populating Database
-
I have an issue with the Default AD/OU not being applied when clicking update. It also does not apply the AD/OU when doing a Quick Registration.
here is a video I created that shows my issue. I have to go to the Active directory for each host and click on the dropdown and select the OU even though it’s already the default OU in the GUI.
Video -
Is your database configured as MyISAM or InnoDB?
If it’s innodb, then I believe the problem is, essentially, a timing issue.
At the time you create the object, the ID of the item being created doesn’t exist. So at the time it’s setting the item, the ID is 0, but object ID 0 never truly exists.
To address this in working-1.6 I had to change the insertId method of the pdodb class.
This change essentially makes re-call’s the database to get the last insert id of the item.
https://github.com/FOGProject/fogproject/commit/c6f47835b073b8bfb3b205205834d68092c4dcd4
To find out if you have InnoDB tables or MyISAM run:
SELECT TABLE_SCHEMA as DbName ,TABLE_NAME as TableName ,ENGINE as Engine FROM information_schema.TABLES WHERE ENGINE='MyISAM' AND TABLE_SCHEMA NOT IN('mysql','information_schema','performance_schema') AND TABLE_SCHEMA = 'fog';
If you want to find out all tables that are innodb:
SELECT TABLE_SCHEMA as DbName ,TABLE_NAME as TableName ,ENGINE as Engine FROM information_schema.TABLES WHERE ENGINE='Innodb' AND TABLE_SCHEMA NOT IN('mysql','information_schema','performance_schema') AND TABLE_SCHEMA = 'fog';
Hopefully this can help you and anybody else out.
-
@Tom-Elliott From what I see in the video @Greg-Plamondon is using a list of default OUs separated by
|
character in the FOG settings. This way you get a drop down list in the host’s AD settings tab. By the looks of things the JavaScript used to fill in the default values as well as the code to clear the fields is not able to handle a drop down list properly. It’s only able to handle a simple text field and works perfectly fine if you only use one single default OU in the FOG settings.I think this would need a lot more JS magic to work. I am not that good with JavaScript, would you look into this Tom?
-
@Sebastian-Roth but in the edit the option is selected from the list and that applies it properly. I can look at the jquery of course but it seems to fail only on create new, but editing works fine.
-
@Tom-Elliott said in Fog V1.5.9.29 Active Directory Defaults for OU not populating Database:
but in the edit the option is selected from the list and that applies it properly.
Do you mean when selecting it from the drop down manually or when clicking “Join Domain after deploy” to apply the default values?
-
@Tom-Elliott said in Fog V1.5.9.29 Active Directory Defaults for OU not populating Database:
SELECT TABLE_SCHEMA as DbName ,TABLE_NAME as TableName ,ENGINE as Engine FROM information_schema.TABLES WHERE ENGINE=‘Innodb’ AND TABLE_SCHEMA NOT IN(‘mysql’,‘information_schema’,‘performance_schema’) AND TABLE_SCHEMA = ‘fog’;
Tom, the database is configured as MyISAM.
-
I have not forgotten about this, just am busy with work and trying to stand up an instance where I can test and apply the issue.
Hopefully will get to it sometime today.
-
Found and fixed in 1.5.9.34
Thank you,
-
@Tom-Elliott said in Fog V1.5.9.29 Active Directory Defaults for OU not populating Database:
Found and fixed in 1.5.9.34
Thank you,
Thanks!