Bug 216405

Summary: hastd in 11 cannot be queried directly after a 'role' command - regression from 10
Product: Base System Reporter: Pete French <pete>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: emaste, linimon
Priority: --- Keywords: regression
Version: 11.0-STABLE   
Hardware: Any   
OS: Any   

Description Pete French 2017-01-23 13:13:47 UTC
On 11-STABLE if I do this:

hastctl role primary cbert0 ; hastctl status

I get

[ERROR] Error 57 received from hastd.

from the status command. If I insert a sleep like this:

hastctl role primary cbert0 ; sleep 1 ; hastctl status

then the error does not appear. This behaviour does not happen under FreeBSD 10.

The bug makes scripts which set the role and chen check it fail - inseryiing sleeps is a workaround, but an ugly one, as surely the expected behaviour is that the role command does not finish leaving the daemon in an unqueryable state.
Comment 1 Pete French 2017-01-27 19:15:02 UTC
More info on this - have discovered that this only happens if the role set fails (in my case due to a bug i the config file). The delay is real, but the fact it only happens on error makes it far less serious.