Skip to content

Commit 07fff00

Browse files
authored
Add fpm to dev container image to avoid podman in docker in GitHub actions (#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](#2012 (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>
1 parent a4b8bc5 commit 07fff00

File tree

10 files changed

+37
-13
lines changed

10 files changed

+37
-13
lines changed

.github/workflows/cli_release.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ jobs:
1919
needs: get-dev-image
2020
container:
2121
image: ${{ needs.get-dev-image.outputs.image-with-tag }}
22-
# --privileged is needed in order for podman to work. Otherwise it fails
23-
# to create a new namespace when the clone syscall happens.
24-
options: --privileged
2522
env:
2623
ARTIFACT_UPLOAD_LOG: "artifact_uploads.json"
2724
steps:

docker.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DOCKER_IMAGE_TAG=202405102250
2-
LINTER_IMAGE_DIGEST=e9987c1c23d0d9c8443b3973f7f3482e5737b10053ce56f58fa59e4cb4f32291
3-
DEV_IMAGE_DIGEST=7e38004cc30aa4f26b800ecad67c8e38fdffdfed8b3be0d3084e1706a60a4f21
4-
DEV_IMAGE_WITH_EXTRAS_DIGEST=c405c9b28a8ed91785ad1115df146b80f275e88f93e4c5a516ad4bb7d4508112
1+
DOCKER_IMAGE_TAG=202409092344
2+
LINTER_IMAGE_DIGEST=18436897f607dd6b1926c12de13be7e9ed668a17cff133e4da90aad0112a406f
3+
DEV_IMAGE_DIGEST=83eba02bf4ced64161276dee88dcd6f02de5951bb3ce5346a1182c70498156aa
4+
DEV_IMAGE_WITH_EXTRAS_DIGEST=27ff4d9111b77516fdf73715ba6ea23d02de3b790d88f6f70a48c5e1ec53570c

tools/chef/base_image_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
202405102217
1+
202409092308

tools/chef/cookbooks/px_dev/recipes/golang.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
execute 'install go binaries' do
4343
ENV['GOPATH'] = "/opt/px_dev/gopath"
4444
command %(go install github.com/golang/mock/mockgen@v1.5.0 && \
45-
go install github.com/cheekybits/genny@v1.0.0 && \
4645
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1 && \
4746
go install k8s.io/code-generator/cmd/client-gen@v0.20.6 && \
4847
go install github.com/go-bindata/go-bindata/go-bindata@v3.1.2+incompatible && \

tools/chef/cookbooks/px_dev_extras/recipes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
include_recipe 'px_dev_extras::mac_os_x'
2222
include_recipe 'px_dev_extras::gperftools'
23+
include_recipe 'px_dev_extras::packaging'
2324

2425
pkg_list = [
2526
'cmake',
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2018- The Pixie Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
17+
# Packaging utilities only need to run on Linux
18+
if node.platform_family?('debian')
19+
apt_package ['ruby-dev', 'rpm'] do
20+
action :upgrade
21+
end
22+
23+
execute 'install_fpm' do
24+
command '/usr/bin/gem install fpm'
25+
action :run
26+
end
27+
end

tools/chef/packer_docker_base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"recipe[px_dev::linux]"
3636
],
3737
"type": "chef-solo",
38-
"version": "18.4.12"
38+
"version": "18.5.0"
3939
},
4040
{
4141
"inline": [

tools/chef/packer_docker_dev.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"recipe[px_dev::cleanup]"
4545
],
4646
"type": "chef-solo",
47-
"version": "18.4.12"
47+
"version": "18.5.0"
4848
},
4949
{
5050
"inline": [

tools/chef/packer_docker_dev_extras.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"recipe[px_dev_extras]"
4242
],
4343
"type": "chef-solo",
44-
"version": "18.4.12"
44+
"version": "18.5.0"
4545
},
4646
{
4747
"inline": [

tools/chef/packer_docker_linters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"recipe[px_dev::cleanup]"
4646
],
4747
"type": "chef-solo",
48-
"version": "18.4.12"
48+
"version": "18.5.0"
4949
},
5050
{
5151
"inline": [

0 commit comments

Comments
 (0)