Skip to content

Conversation

@ddelnano
Copy link
Member

@ddelnano ddelnano commented Sep 9, 2024

Summary: Add fpm to dev container image to avoid podman in docker in GitHub actions

The production cli release build fails on these steps. The container running the job is unable to create new namespaces and runs into the following error:

+ podman run -i --rm -v /tmp/tmp.oCPtyljlYd:/src/ -v /__w/pixie/pixie:/image docker.io/cdrx/fpm-fedora:24 fpm -f -p /image/pixie-px-0.8.3.x86_64.rpm -s dir -t rpm -n pixie-px -v 0.8.3 --prefix /usr/local/bin px
time="2024-09-06T18:10:15Z" level=warning msg="\"/\" is not a shared mount, this could cause issues or missing mounts with rootless containers"
cannot clone: Operation not permitted
Error: cannot re-exec process

Rather than fix the namespace creation problem, which has been difficult to debug, this installs the necessary tools within the container. This will allow us to avoid using podman to run fpm.

This change also reverts the previous attempt at fixing this and removes genny from the container image. See this comment for more details on the genny removal.

Relevant Issues: #1993

Type of change: /kind bugfix

Test Plan: Verified that building the deb and rpm packages works from the ubuntu based dev container image and that installing the packages is successful in their respective distros

$ docker run --entrypoint bash -it docker.io/ddelnano/dev_image:202409082304
root@f65d4d86e9be:/src# fpm -f -s dir -t rpm -n pixie-px -v 0.8.3 --prefix /usr/local/bin  -p pixie-px-0.8.3.x86_64.rpm px
Created package {:path=>"pixie-px-0.8.3.x86_64.rpm"}
root@f65d4d86e9be:/src# fpm -f -s dir -t deb -n pixie-px -v 0.8.3 --prefix /usr/local/bin  -p pixie-px-0.8.3.deb  px
Created package {:path=>"pixie-px-0.8.3.deb"}

# Install the rpm package and test px in a fedora container
$ docker run --entrypoint bash -it -v $(pwd):/src/ -w /src fedora
[root@90a53608bae0 src]# rpm -i pixie-px-0.8.3.x86_64.rpm
[root@90a53608bae0 src]# px --version
Pixie CLI
  • Verified chef works against a Ubuntu noble VM
  • Ran #ci:ignore-deps and #ci:bpf-build-all-kernels build due to genny removal

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano requested review from a team as code owners September 9, 2024 03:14
…ixie-io#2011)"

This reverts commit a4b8bc5.

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/add-fpm-to-dev-image branch from fb2e3ec to e8544c9 Compare September 9, 2024 03:14
Comment on lines 24 to 25
command '/usr/bin/gem install fpm'
action :run
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use the gem_package resource to avoid running a shell command. Unfortunately this was installing the gem within the chef ruby (confirmed with opensnoop as the build ran). Even if gem_binary specified this gem binary (/usr/bin/gem), I couldn't find a way to get it to work.

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/add-fpm-to-dev-image branch from 7a0c3ef to 901a387 Compare September 9, 2024 22:53
Copy link
Member

@JamesMBartlett JamesMBartlett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending image digest updates.

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
…te docker.properties

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
execute 'install go binaries' do
ENV['GOPATH'] = "/opt/px_dev/gopath"
command %(go install github.com/golang/mock/mockgen@v1.5.0 && \
go install github.com/cheekybits/genny@v1.0.0 && \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to install genny results in the following error:

$ go install github.com/cheekybits/genny@v1.0.0
go: finding module for package golang.org/x/tools/imports
go: toolchain upgrade needed to resolve golang.org/x/tools/imports
go: golang.org/x/tools@v0.25.0 requires go >= 1.22.0 (running go 1.21.0)

I wasn't able to get to the bottom of how this changed between the beginning on my PR and now or what dependency is causing this toolchain requirement.

Anyway, it appears that the last reference to genny was removed in 806ad3f. This opts to remove it instead of trying to work around this issue.

# Verify that genny is no longer used on that commit

ddelnano@dev-vm:~/code/pixie-worktree ((806ad3f67...)) $ git grep -i genny
go.sum:github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk=
go.sum:github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28=
go.sum:github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo=
go.sum:github.com/gobuffalo/genny v0.1.1 h1:iQ0D6SpNXIxu52WESsD+KoQ7af2e3nCfnSBoSF/hKe0=
go.sum:github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk=
Binary file go_deps.bzl matches
tools/arc_addons/pixielabs/unit/ArcanistGoGenCheckerTestEngine.php:    'genny' => '/(?<=-out )(.*)(?=\.gen\.go)/',
tools/chef/cookbooks/pixielabs/recipes/base.rb:            github.com/cheekybits/genny@v1.0.0 \

# Go back a commit and see that XXX removed the final reference

ddelnano@dev-vm:~/code/pixie-worktree ((806ad3f67...)) $ git checkout HEAD~1
Previous HEAD position was 806ad3f67 Use informers for k8s metadata watcher
HEAD is now at b0d2c6c56 Add dataAccess flag to CLI

ddelnano@dev-vm:~/code/pixie-worktree ((b0d2c6c56...)) $ git grep -i genny
go.sum:github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk=
go.sum:github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28=
go.sum:github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo=
go.sum:github.com/gobuffalo/genny v0.1.1 h1:iQ0D6SpNXIxu52WESsD+KoQ7af2e3nCfnSBoSF/hKe0=
go.sum:github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk=
Binary file go_deps.bzl matches
Binary file src/vizier/services/metadata/controllers/k8smeta/k8s_metadata_utils.gen.go matches
src/vizier/services/metadata/controllers/k8smeta/k8s_metadata_utils.go://go:generate genny -in=k8s_metadata_utils.tmpl -out k8s_metadata_utils.gen.go gen "ReplacedResource=Pod,Service,Namespace,Endpoints,Node"
src/vizier/services/metadata/controllers/k8smeta/k8s_metadata_utils.tmpl:       "github.com/cheekybits/genny/generic"
tools/arc_addons/pixielabs/unit/ArcanistGoGenCheckerTestEngine.php:    'genny' => '/(?<=-out )(.*)(?=\.gen\.go)/',
tools/chef/cookbooks/pixielabs/recipes/base.rb:            github.com/cheekybits/genny@v1.0.0 \

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Comment on lines +23 to +26
execute 'install_fpm' do
command '/usr/bin/gem install fpm'
action :run
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retested using gem_package and it installs fpm within /opt/chef/embedded as I saw during my previous test. Below is the opensnoop output filtered by fpm files and the git diff showing what I tested:

$ git diff
diff --git a/tools/chef/cookbooks/px_dev_extras/recipes/packaging.rb b/tools/chef/cookbooks/px_dev_extras/recipes/packaging.rb
index 7d9177935..2292ec4d6 100644
--- a/tools/chef/cookbooks/px_dev_extras/recipes/packaging.rb
+++ b/tools/chef/cookbooks/px_dev_extras/recipes/packaging.rb
@@ -20,8 +20,11 @@ if node.platform_family?('debian')
     action :upgrade
   end

-  execute 'install_fpm' do
-    command '/usr/bin/gem install fpm'
-    action :run
+  gem_package 'fpm' do
+    gem_binary '/usr/bin/gem'
   end
+  # execute 'install_fpm' do
+  #   command '/usr/bin/gem install fpm'
+  #   action :run
+  # end
 end


$ grep fpm chef_opensnoop.txt | grep -v 'git\|php'
1759223 python3             5   0 /tmp/pip-build-tracker-dioyjfpm
1786655 chef-solo           9   0 /root/.local/share/gem/specs/index.rubygems.org%443/quick/Marshal.4.8/fpm-1.15.1.gemspec
1787105 ruby                6   0 /root/.local/share/gem/specs/index.rubygems.org%443/quick/Marshal.4.8/fpm-1.15.1.gemspec
1787105 request_set.rb*     6   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/cache/fpm-1.15.1.gem
1787105 ruby                6   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/cache/fpm-1.15.1.gem
1787105 ruby                6   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/cache/fpm-1.15.1.gem
1787105 ruby                6   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/cache/fpm-1.15.1.gem
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/CHANGELOG.rst
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/CONTRIBUTORS
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/LICENSE
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/bin/fpm
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/command.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/errors.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/namespace.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/apk.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/cpan.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/deb.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/dir.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/empty.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/freebsd.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/gem.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/npm.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/osxpkg.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/p5p.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/pacman.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/pear.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/pkgin.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/pleaserun.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/puppet.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/pyfpm/__init__.py
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/pyfpm/get_metadata.py
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/python.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/rpm.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/sh.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/snap.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/solaris.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/tar.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/virtualenv.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/package/zip.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/rake_task.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/util.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/util/tar_writer.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/lib/fpm/version.rb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb/changelog.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb/deb.changes.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb/ldconfig.sh.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb/postinst_upgrade.sh.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb/postrm_upgrade.sh.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb/preinst_upgrade.sh.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/deb/prerm_upgrade.sh.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/osxpkg.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/p5p_metadata.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/pacman.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/pacman/INSTALL.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/pleaserun/generate-cleanup.sh
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/pleaserun/install-path.sh
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/pleaserun/install.sh
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/pleaserun/scripts/after-install.sh
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/pleaserun/scripts/before-remove.sh
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/puppet/package.pp.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/puppet/package/remove.pp.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/rpm.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/rpm/filesystem_list
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/sh.erb
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/templates/solaris.erb
1787105 ruby                6   0 /opt/chef/embedded/bin/fpm
1787105 ruby                7   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/fpm-1.15.1/bin/fpm
1787105 ruby                6   0 /opt/chef/embedded/lib/ruby/gems/3.1.0/specifications/fpm-1.15.1.gemspec
1788739 rm                  4   0 fpm-1.15.1
1788739 rm                  4   0 fpm

@ddelnano ddelnano merged commit 07fff00 into pixie-io:main Sep 10, 2024
@ddelnano ddelnano deleted the ddelnano/add-fpm-to-dev-image branch September 10, 2024 15:40
ddelnano added a commit that referenced this pull request Sep 10, 2024
#2015)

Summary: Use fpm binary from within dev_image_extras container for cli
releases

With #2012 merged, the `dev_image_with_extras` container image now
contains `fpm`. This change removes the use of podman to avoid the
permission issues seen in recent cli builds. This should allow the
production cli release build to succeed.

Relevant Issues: Closes #1993

Type of change: /kind bugfix

Test Plan: Verified that `fpm` exists in most recent image and packaging
building commands work (see testing on #2012). Running a production cli
release build is needed after this is merged to complete the testing.
```
$ ./scripts/run_docker.sh
sha256:c14b06e5753d4d9c6b2ff8671843043113cdcfa3f3cb36a492a665d71dc42fad
grep: /etc/bazelrc: No such file or directory
Run Parameters:
        Build Buddy:             Disabled
        Shell:                   /bin/bash
+ docker run --rm --hostname px-dev-docker-dev-vm.us-west1-a.c.endless-datum-422018.internal -it -v /dev/shm:/dev/shm -v /home/ddelnano:/home/ddelnano -v /var/run/docker.sock:/var/run/docker.sock -v /home/ddelnano/code/pixie-worktree:/px/src/px.dev/pixie --network=host -v /usr/local/bin/px:/bin/px px_dev_image:202409092344 /bin/bash
ddelnano@px-dev-docker-dev-vm:/px/src/px.dev/pixie (ddelnano/use-fpm-within-dev_image_extras-container) $ fpm --version
1.15.1

```

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano added a commit to ddelnano/pixie that referenced this pull request Sep 23, 2024
pixie-io#2015)

Summary: Use fpm binary from within dev_image_extras container for cli
releases

With pixie-io#2012 merged, the `dev_image_with_extras` container image now
contains `fpm`. This change removes the use of podman to avoid the
permission issues seen in recent cli builds. This should allow the
production cli release build to succeed.

Relevant Issues: Closes pixie-io#1993

Type of change: /kind bugfix

Test Plan: Verified that `fpm` exists in most recent image and packaging
building commands work (see testing on pixie-io#2012). Running a production cli
release build is needed after this is merged to complete the testing.
```
$ ./scripts/run_docker.sh
sha256:c14b06e5753d4d9c6b2ff8671843043113cdcfa3f3cb36a492a665d71dc42fad
grep: /etc/bazelrc: No such file or directory
Run Parameters:
        Build Buddy:             Disabled
        Shell:                   /bin/bash
+ docker run --rm --hostname px-dev-docker-dev-vm.us-west1-a.c.endless-datum-422018.internal -it -v /dev/shm:/dev/shm -v /home/ddelnano:/home/ddelnano -v /var/run/docker.sock:/var/run/docker.sock -v /home/ddelnano/code/pixie-worktree:/px/src/px.dev/pixie --network=host -v /usr/local/bin/px:/bin/px px_dev_image:202409092344 /bin/bash
ddelnano@px-dev-docker-dev-vm:/px/src/px.dev/pixie (ddelnano/use-fpm-within-dev_image_extras-container) $ fpm --version
1.15.1

```

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 4528883
ddelnano added a commit to ddelnano/pixie that referenced this pull request Aug 6, 2025
…tions (pixie-io#2012)

Summary: Add fpm to dev container image to avoid podman in docker in
GitHub actions

The production cli release build fails on these steps. The container
running the job is unable to create new namespaces and runs into the
following error:

```
+ podman run -i --rm -v /tmp/tmp.oCPtyljlYd:/src/ -v /__w/pixie/pixie:/image docker.io/cdrx/fpm-fedora:24 fpm -f -p /image/pixie-px-0.8.3.x86_64.rpm -s dir -t rpm -n pixie-px -v 0.8.3 --prefix /usr/local/bin px
time="2024-09-06T18:10:15Z" level=warning msg="\"/\" is not a shared mount, this could cause issues or missing mounts with rootless containers"
cannot clone: Operation not permitted
Error: cannot re-exec process
```

Rather than fix the namespace creation problem, which has been difficult
to debug, this installs the necessary tools within the container. This
will allow us to avoid using podman to run `fpm`.

This change also reverts the previous attempt at fixing this and removes
genny from the container image. See [this
comment](pixie-io#2012 (comment))
for more details on the genny removal.

Relevant Issues: pixie-io#1993

Type of change: /kind bugfix

Test Plan: Verified that building the deb and rpm packages works from
the ubuntu based dev container image and that installing the packages is
successful in their respective distros
```
$ docker run --entrypoint bash -it docker.io/ddelnano/dev_image:202409082304
root@f65d4d86e9be:/src# fpm -f -s dir -t rpm -n pixie-px -v 0.8.3 --prefix /usr/local/bin  -p pixie-px-0.8.3.x86_64.rpm px
Created package {:path=>"pixie-px-0.8.3.x86_64.rpm"}
root@f65d4d86e9be:/src# fpm -f -s dir -t deb -n pixie-px -v 0.8.3 --prefix /usr/local/bin  -p pixie-px-0.8.3.deb  px
Created package {:path=>"pixie-px-0.8.3.deb"}

# Install the rpm package and test px in a fedora container
$ docker run --entrypoint bash -it -v $(pwd):/src/ -w /src fedora
[root@90a53608bae0 src]# rpm -i pixie-px-0.8.3.x86_64.rpm
[root@90a53608bae0 src]# px --version
Pixie CLI
```
- Verified chef works against a Ubuntu noble VM
- [ ] Ran `#ci:ignore-deps` and `#ci:bpf-build-all-kernels` build due to
genny removal

---------

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 07fff00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants