Volume lookup needs to include state to unmarshal into

Lookup was written before volume states merged, but merged after,
and CI didn't catch the obvious failure here. Without a valid
state, we try to unmarshall into a null pointer, and 'volume rm'
is completely broken because of it.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2019-09-11 10:17:28 -04:00
parent 093013b099
commit 5ddfe5d95d

View File

@ -1749,6 +1749,7 @@ func (s *BoltState) LookupVolume(name string) (*Volume, error) {
volume := new(Volume)
volume.config = new(VolumeConfig)
volume.state = new(VolumeState)
db, err := s.getDBCon()
if err != nil {