Because stateShim embeds *state.State, the st.Space() above should've been st.State.Space(), otherwise we get the infinite recursion.
I've managed to reproduce this by bootstrapping on MAAS 2.1 and using the mongo CLI, modified the controllers collection to set MongoSpaceName="default, MongoSpaceState="valid", which triggers the call to Space() and the recursion. I'll describe the QA steps to get to that state in the PR I'm about to propose.
Even though I couldn't reproduce this normally by bootstrapping, the culprit is pretty obviously in worker/ peergrouper/ shim.go:
func (st *stateShim) Space(name string) (SpaceReader, error) {
return st.Space(name)
}
Because stateShim embeds *state.State, the st.Space() above should've been st.State.Space(), otherwise we get the infinite recursion.
I've managed to reproduce this by bootstrapping on MAAS 2.1 and using the mongo CLI, modified the controllers collection to set MongoSpaceName= "default, MongoSpaceState ="valid" , which triggers the call to Space() and the recursion. I'll describe the QA steps to get to that state in the PR I'm about to propose.