Skip to content

Conversation

@kbats183
Copy link

@kbats183 kbats183 commented Oct 6, 2025

I encountered an issue when trying to pull tasks using fog/service/hostinfo.php.

In some cases, fog/status/hostgetkey.php generates a new token, saves it to the database, but returns an empty string as the token value.
I believe this happens due to a race condition between storing the token in the database and retrieving it for returning.

This change generates the new token before updating the database and reuses it for both the DB update and the return value.
This ensures the function always returns the correct token.

@darksidemilk
Copy link
Member

darksidemilk commented Oct 6, 2025 via email

@kbats183
Copy link
Author

kbats183 commented Oct 6, 2025

I’m pulling tasks via the PHP file using the same approach that FOG uses to get kernel argument properties during USB boot.

My use case is that I have more than 100 laptops that I want to image via FOG multicast only once (without continuous management through FOG afterward).
I’m using the Quick Registration option to register the hosts, assign an image, and add them to a group — and I’d like to run this whole process without requiring an extra reboot between quick registration and imaging.
I’ve also patched the kernel slightly to support this workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants