aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/k8splugin/db/mongo.go8
-rwxr-xr-xvagrant/setup.sh5
2 files changed, 12 insertions, 1 deletions
diff --git a/src/k8splugin/db/mongo.go b/src/k8splugin/db/mongo.go
index 65e721c3..05976b12 100644
--- a/src/k8splugin/db/mongo.go
+++ b/src/k8splugin/db/mongo.go
@@ -183,7 +183,13 @@ func (m *MongoStore) Read(coll, key, tag string) ([]byte, error) {
}
//Return the data as a byte array
- return tagdata.Lookup(tag).Value, nil
+ //Convert string data to byte array using the built-in functions
+ switch tagdata.Lookup(tag).Type {
+ case bson.TypeString:
+ return []byte(tagdata.Lookup(tag).StringValue()), nil
+ default:
+ return tagdata.Lookup(tag).Value, nil
+ }
}
// Helper function that deletes an object by its ID
diff --git a/vagrant/setup.sh b/vagrant/setup.sh
index 3bbcc4ce..a135ea96 100755
--- a/vagrant/setup.sh
+++ b/vagrant/setup.sh
@@ -188,5 +188,10 @@ if [ $VAGRANT_DEFAULT_PROVIDER == libvirt ]; then
vagrant plugin install vagrant-libvirt
sudo usermod -a -G $libvirt_group $USER # This might require to reload user's group assigments
sudo systemctl restart libvirtd
+
+ # Start statd service to prevent NFS lock errors
+ sudo systemctl enable rpc-statd
+ sudo systemctl start rpc-statd
+
kvm-ok
fi