summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/images.go18
-rw-r--r--pkg/machine/ignition.go1
-rw-r--r--pkg/machine/qemu/machine.go4
-rw-r--r--pkg/specgen/namespaces.go4
4 files changed, 14 insertions, 13 deletions
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go
index 401a7ec1b..acb2172a2 100644
--- a/pkg/api/handlers/compat/images.go
+++ b/pkg/api/handlers/compat/images.go
@@ -97,13 +97,13 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
query := struct {
- Author string `schema:"author"`
- Changes string `schema:"changes"`
- Comment string `schema:"comment"`
- Container string `schema:"container"`
- Pause bool `schema:"pause"`
- Repo string `schema:"repo"`
- Tag string `schema:"tag"`
+ Author string `schema:"author"`
+ Changes []string `schema:"changes"`
+ Comment string `schema:"comment"`
+ Container string `schema:"container"`
+ Pause bool `schema:"pause"`
+ Repo string `schema:"repo"`
+ Tag string `schema:"tag"`
// fromSrc string # fromSrc is currently unused
}{
Tag: "latest",
@@ -138,8 +138,8 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) {
options.Message = query.Comment
options.Author = query.Author
options.Pause = query.Pause
- if query.Changes != "" {
- options.Changes = strings.Split(query.Changes, ",")
+ for _, change := range query.Changes {
+ options.Changes = append(options.Changes, strings.Split(change, "\n")...)
}
ctr, err := runtime.LookupContainer(query.Container)
if err != nil {
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go
index 09228553c..ca6abd48c 100644
--- a/pkg/machine/ignition.go
+++ b/pkg/machine/ignition.go
@@ -243,7 +243,6 @@ ExecStart=/usr/bin/sleep infinity
`
containers := `[containers]
netns="bridge"
-rootless_networking="cni"
`
rootContainers := `[engine]
machine_enabled=true
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index e1870f1ac..eb7b35ece 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -390,12 +390,14 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
if err != nil {
return err
}
- for running || !v.isListening() {
+ listening := v.isListening()
+ for !running || !listening {
time.Sleep(100 * time.Millisecond)
running, err = v.isRunning()
if err != nil {
return err
}
+ listening = v.isListening()
}
}
for _, mount := range v.Mounts {
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index 1634b86b5..f61937078 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -353,11 +353,11 @@ func ParseNetworkFlag(networks []string) (Namespace, map[string]types.PerNetwork
toReturn.NSMode = FromPod
case ns == "" || ns == string(Default) || ns == string(Private):
// Net defaults to Slirp on rootless
- if rootless.IsRootless() && containerConfig.Containers.RootlessNetworking != "cni" {
+ if rootless.IsRootless() {
toReturn.NSMode = Slirp
break
}
- // if not slirp we use bridge
+ // if root we use bridge
fallthrough
case ns == string(Bridge), strings.HasPrefix(ns, string(Bridge)+":"):
toReturn.NSMode = Bridge