From 1ea17b6fdd941df32be87236bb3106b3355b1ec7 Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Tue, 29 Apr 2025 09:22:09 -0400 Subject: [PATCH 1/3] Fix mach os pr release action - Remove branch restrictions - Do not open PR on main - Add release note to PR Signed-off-by: Ashley Cui --- .github/workflows/machine-os-pr.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/machine-os-pr.yml b/.github/workflows/machine-os-pr.yml index 5cf986ec76..db222ce83d 100644 --- a/.github/workflows/machine-os-pr.yml +++ b/.github/workflows/machine-os-pr.yml @@ -2,11 +2,6 @@ name: "Machine OS PR" on: pull_request_target: - # prevent action from running on older release-process branches - # TODO: remove when we move to new release flow - branches: - - 'v5.5' - - 'main' paths: - 'version/rawversion/version.go' @@ -34,8 +29,10 @@ jobs: run: | VERSION=$(curl "https://raw.githubusercontent.com/$PODMAN_REPO/$SHA/version/rawversion/version.go" | sed -n 's/^const RawVersion = \"\(.*\)\"$/\1/p') # ignore -dev version bumps unless on main - if [[ ${{github.base_ref}} != "main" ]] && [[ $VERSION == *-dev ]] ; then - echo "::warning:: SKIPPING: dev bump not on main" + if [[ $VERSION == *-dev ]] ; then + echo "::warning:: SKIPPING: dev bump" + elif [[ ${{github.base_ref}} == "main" ]] ; then + echo "::warning:: SKIPPING: main branch" elif [[ ${{github.base_ref}} == *-rhel ]] ; then echo "::warning:: SKIPPING: rhel branch" else @@ -128,9 +125,11 @@ jobs: id: pr run: | bumpbranch="pr${{github.event.number}}" + body=$(printf 'Triggered by https://github.com/%s/pull/%s\n\n```release-note\nRelease v%s\n```\n' \ + "$PODMAN_REPO" "${{github.event.number}}" "${{ steps.getversion.outputs.version }}") uri=`gh pr create \ --title "Bump Podman to v${{ steps.getversion.outputs.version }}" \ - --body "Triggered by https://github.com/$PODMAN_REPO/pull/${{github.event.number}}" \ + --body "$body" \ --head "podmanbot:$bumpbranch" \ --base "${{github.base_ref}}" \ --repo $UPSTREAM_MACHINE_OS` From 3f43df2bdbf5e681d8cfcf3a4975cf22e2236821 Mon Sep 17 00:00:00 2001 From: Jake Correnti Date: Tue, 8 Apr 2025 11:56:21 -0400 Subject: [PATCH 2/3] Handle signal preventing Start from completing In the instance where the user sends a signal, such as SIGINT (Ctl-c) when a Podman Machine is in the middle of starting, make sure the state doesn't get stuck in the "Currently Starting" status. Resolves: #24416 Signed-off-by: Jake Correnti --- pkg/machine/shim/host.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pkg/machine/shim/host.go b/pkg/machine/shim/host.go index ad1d9ff4bf..3b368b4a87 100644 --- a/pkg/machine/shim/host.go +++ b/pkg/machine/shim/host.go @@ -6,10 +6,12 @@ import ( "fmt" "io" "os" + "os/signal" "path" "path/filepath" "runtime" "strings" + "syscall" "time" "github.com/containers/podman/v5/pkg/machine" @@ -440,6 +442,7 @@ func stopLocked(mc *vmconfigs.MachineConfig, mp vmconfigs.VMProvider, dirs *mach func Start(mc *vmconfigs.MachineConfig, mp vmconfigs.VMProvider, dirs *machineDefine.MachineDirs, opts machine.StartOptions) error { defaultBackoff := 500 * time.Millisecond maxBackoffs := 6 + signalChanClosed := false mc.Lock() defer mc.Unlock() @@ -471,17 +474,41 @@ func Start(mc *vmconfigs.MachineConfig, mp vmconfigs.VMProvider, dirs *machineDe } } + // if the machine cannot continue starting due to a signal, ensure the state + // reflects the machine is no longer starting + signalChan := make(chan os.Signal, 1) + signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM) + go func() { + sig, ok := <-signalChan + if ok { + mc.Starting = false + logrus.Error("signal received when starting the machine: ", sig) + + if err := mc.Write(); err != nil { + logrus.Error(err) + } + + os.Exit(1) + } + }() + // Set starting to true mc.Starting = true if err := mc.Write(); err != nil { logrus.Error(err) } + // Set starting to false on exit defer func() { mc.Starting = false if err := mc.Write(); err != nil { logrus.Error(err) } + + if !signalChanClosed { + signal.Stop(signalChan) + close(signalChan) + } }() gvproxyPidFile, err := dirs.RuntimeDir.AppendToNewVMFile("gvproxy.pid", nil) @@ -557,6 +584,11 @@ func Start(mc *vmconfigs.MachineConfig, mp vmconfigs.VMProvider, dirs *machineDe return errors.New(msg) } + // now that the machine has transitioned into the running state, we don't need a goroutine listening for SIGINT or SIGTERM to handle state + signal.Stop(signalChan) + close(signalChan) + signalChanClosed = true + if err := proxyenv.ApplyProxies(mc); err != nil { return err } From c7ad64cedc840572288362617c5c266a78dd5436 Mon Sep 17 00:00:00 2001 From: Matt Heon Date: Wed, 30 Apr 2025 13:53:14 -0400 Subject: [PATCH 3/3] Update release notes for v5.5.0-rc2 Signed-off-by: Matt Heon --- RELEASE_NOTES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8df761895d..429456927f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -49,12 +49,16 @@ - Fixed a bug where the `podman system df` command could show a negative reclaimable size. - Fixed a bug where accessing a rootful `podman machine` VM that was not `podman-machine-default` (the default VM) with the `podman machine ssh` command would put the user into the rootless shell ([#25332](https://github.com/containers/podman/issues/25332)). - Fixed a bug where the `podman machine init` would report nonsensical memory values in error messages when trying to create a machine with more memory than the system. +- Fixed a bug where the remote Podman client's `podman start --attach` command would incorrectly print an error when run on a container created with the `--rm` option ([#25965](https://github.com/containers/podman/issues/25965)). +- Fixed a bug where the remote Podman client's `podman pull` command could hang and leak memory if the server was unexpectedly stopped or encountered an error during a pull. - Fixed a bug where the remote Podman client's `podman cp` command would, on Windows, often fail to copy files into the container due to improper handling of Windows paths ([#14862](https://github.com/containers/podman/issues/14862)). - Fixed a bug where the `podman container clone` command did not correctly copy healthcheck settings to the new container ([#21630](https://github.com/containers/podman/issues/21630)). - Fixed a bug where the `podman kube play` command would fail to start empty pods ([#25786](https://github.com/containers/podman/issues/25786)). - Fixed a bug where the `podman volume ls` command did not output headers when no volumes were present ([#25911](https://github.com/containers/podman/issues/25911)). - Fixed a bug where healthcheck configuration provided by a container's image could not be overridden unless the `--health-cmd` option was specified when creating the container ([#20212](https://github.com/containers/podman/issues/20212)). - Fixed a bug where the `--user` option to `podman create` and `podman run` could not be used with users added to the container by the `--hostuser` option ([#25805](https://github.com/containers/podman/issues/25805)). +- Fixed a bug where the `podman system reset` command on FreeBSD would incorrectly print an error. +- Fixed a bug where stopping the `podman machine start` command with SIGINT could result in machine state being incorrectly set to "Starting" ([#24416](https://github.com/containers/podman/issues/24416)). ### API - Fixed a bug where the Compat Create API for Containers ignored ulimits specified in the request when Podman was run rootless ([#25881](https://github.com/containers/podman/issues/25881)).