Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

contrib: use centos7 for wip-*-nautilus - #1706

Merged
dsavineau merged 14 commits into
ceph:masterfrom
tchaikov:wip-build-nautilus-el7
Oct 28, 2020
Merged

dsavineau merged 14 commits into
ceph:masterfrom
tchaikov:wip-build-nautilus-el7

Conversation

@tchaikov

@tchaikov tchaikov commented Jul 2, 2020

Copy link
Copy Markdown
Contributor

Signed-off-by: Kefu Chai [email protected]

Description of your changes:

Which issue is resolved by this Pull Request:
Resolves #

Checklist:

  • Documentation has been updated, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.

@tchaikov
tchaikov requested a review from dsavineau July 2, 2020 13:20
@tchaikov

tchaikov commented Jul 2, 2020

Copy link
Copy Markdown
Contributor Author

see https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos7,DIST=centos7,MACHINE_SIZE=gigantic/42675//consoleFull

make[1]: *** [do.image.x86_64,wip-yuri3-testing-2020-07-01-1707-nautilus,centos,8] Error 2

recently we are seeing build failures because contrib/build-push-ceph-container-imgs.sh is trying to pull ceph-mgr-cephadm for building a branch named "wip-yuri3-testing-2020-07-01-1707-nautilus", which does match "^wip*", but it's actually a nautilus branch. so in this change, use a different way in hope to fix this build failure.

@tchaikov

tchaikov commented Jul 2, 2020

Copy link
Copy Markdown
Contributor Author

see ceph/ceph-build#1607

@dsavineau

Copy link
Copy Markdown
Contributor

I guess this isn't so simple and need more refactoring. From what I remember the wip-* branches were only working for ceph@master.

Even with this change, that would mean we will use nfs-ganesha/ceph-iscsi version like ceph@master but for nautilus & others. As an example, with wip-xxx-nautilus, we will try to install nfs-ganesha 3 with el7 packages which doesn't exist.

https://github.com/ceph/ceph-container/blob/master/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__#L7
https://github.com/ceph/ceph-container/blob/master/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__#L26

Also this would not work as mentioned about cephadm package (and probably other packages) because of the wip-xxx-nautilus branch name.
Because the name of the release isn't nautilus then we're not using the nautilus overrides in [1] which excludes cephadm package [2][3]

[1] https://github.com/ceph/ceph-container/tree/master/ceph-releases
[2] https://github.com/ceph/ceph-container/blob/master/src/daemon-base/__CEPH_MGR_PACKAGES__
[3] https://github.com/ceph/ceph-container/blob/master/ceph-releases/nautilus/daemon-base/__CEPH_MGR_PACKAGES__

@tchaikov

tchaikov commented Jul 6, 2020

Copy link
Copy Markdown
Contributor Author

@dsavineau Dimitri, thanks for your details explanation! yes, it's more complicated that what i imaged. will revise the change.

@djgalloway

Copy link
Copy Markdown
Contributor

I think we can just do this instead? ceph/ceph-build#1613

@tchaikov

Copy link
Copy Markdown
Contributor Author

@dsavineau i updated this changeset as suggested. but i am seeing

error: open of null/noarch/ceph-release-1-0.el7.noarch.rpm failed: No such file or directory
Error: error building at STEP "RUN yum install -y epel-release && yum install -y jq && bash -c  ....
...
bash -c '   if [[ "${CEPH_VERSION}" =~ master ]] || ${CEPH_DEVEL}; then     REPO_URL=$(curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/7&flavor=${OSD_FLAVOR}&ref=${CEPH_REF}&sha1=latest" | jq -a ".[0] | .url"); 
...
rpm -Uvh "$REPO_URL/noarch/ceph-release-1-${RELEASE_VER}.el7.noarch.rpm" '

in https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos8,DIST=centos8,MACHINE_SIZE=gigantic/43420//consoleFull

could you help me understand what i am missing in my change?

@djgalloway

Copy link
Copy Markdown
Contributor

@dsavineau i updated this changeset as suggested. but i am seeing

error: open of null/noarch/ceph-release-1-0.el7.noarch.rpm failed: No such file or directory
Error: error building at STEP "RUN yum install -y epel-release && yum install -y jq && bash -c  ....
...
bash -c '   if [[ "${CEPH_VERSION}" =~ master ]] || ${CEPH_DEVEL}; then     REPO_URL=$(curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/7&flavor=${OSD_FLAVOR}&ref=${CEPH_REF}&sha1=latest" | jq -a ".[0] | .url"); 
...
rpm -Uvh "$REPO_URL/noarch/ceph-release-1-${RELEASE_VER}.el7.noarch.rpm" '

in https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos8,DIST=centos8,MACHINE_SIZE=gigantic/43420//consoleFull

could you help me understand what i am missing in my change?

This job was building a wip*nautilus* branch for CentOS 8 (we do release Nautilus for CentOS 7 and 8). But we have the desired OS version hardcoded here: https://github.com/ceph/ceph-container/pull/1706/files#diff-9bd28db8c71e92c690fefd2d189c6b46R67

So the CentOS8 package build of nautilus-wip-kefu-1 finished and we got a repo. Except since we tell ceph-container nautilus == CentOS 7, it checked the CentOS 7 chacra repo for the ceph-release RPM but that repo wasn't ready yet. (It is right now though) https://shaman.ceph.com/api/search/?project=ceph&distros=centos/7&flavor=default&ref=nautilus-wip-kefu-1&sha1=latest

I believe we need to pass the OS version we just built packages for to build-push-ceph-container-imgs.sh instead of relying on a hardcoded matrix that doesn't take into account the fact that we build Octopus and Nautilus on CentOS 7 and 8. Or maybe if the OS version isn't passed as a variable to build-push-ceph-container-imgs.sh, then fall back on the hardcoded matrix.

@tchaikov

tchaikov commented Jul 20, 2020 via email

Copy link
Copy Markdown
Contributor Author

@tchaikov
tchaikov force-pushed the wip-build-nautilus-el7 branch 3 times, most recently from acbb5b2 to bfc43d0 Compare July 21, 2020 10:27
@tchaikov

Copy link
Copy Markdown
Contributor Author

the change on ceph-build end is ceph/ceph-build#1628

@djgalloway

Copy link
Copy Markdown
Contributor

LGTM. Are we ignoring the lint checks?

@tchaikov
tchaikov force-pushed the wip-build-nautilus-el7 branch 4 times, most recently from 0da488a to 94b3723 Compare July 21, 2020 16:02
@tchaikov

Copy link
Copy Markdown
Contributor Author

jenkins flake8

@tchaikov

tchaikov commented Sep 4, 2020

Copy link
Copy Markdown
Contributor Author

@dsavineau ping?

@tchaikov

Copy link
Copy Markdown
Contributor Author

@dsavineau ping?

2 similar comments
@tchaikov

Copy link
Copy Markdown
Contributor Author

@dsavineau ping?

@tchaikov

tchaikov commented Oct 2, 2020

Copy link
Copy Markdown
Contributor Author

@dsavineau ping?

so we can reuse it in another function in a following change, which
extracts the ceph_version out of version_spec.

Signed-off-by: Kefu Chai <[email protected]>
do not use a branch name starts with "wip" for its CEPH_VERSION anymore,
as wip-nautilus-foobar is more likely a testing branch for nautilus. but
we assume a "wip-*" branch is based on master in ceph-container. let's
drop this hypothesis from its source.

Signed-off-by: Kefu Chai <[email protected]>
stop matching "wip-", as it can be very wrong as sometimes, we name
release branches with "wip" prefix also.

Signed-off-by: Kefu Chai <[email protected]>
before this change $CEPH_VERSION is used for two purposes:

1. for identifying the ceph build using shaman API
2. for differentiating different builds of Ceph, as we containerize
   different Ceph major releases with different ingredients.

and we were using "^wip" for matching $CEPH_VERSION, when they matches,
the Ceph build is considered as a branch based on master. but this is
not always true, sometimes, we use branch names like
"wip-nautilus-foobar" for testing nautilus. in this case, we should use
nautilus as its $CEPH_VERSION for picking the ingredients, use
"wip-nautilus-foobar" for retrieving the packages from chacra, and use
"wip-nautilus-foobar" for composing the tag names of the built image.

in this change,

* CEPH_VERSION is repurposed for differentiating the ingredients for
  building the container image. this env var is consumed by stage.py.
* a new env var `CEPH_REF` is introduced for referencing the build
  from which the container image is built. this env var is deduced
  from the given FLAVORS. and following rules are enforced:
  - any CEPH_VERSION_SPEC containing "wip" are used for CEPH_REF
  - any CEPH_VERSION_SPEC not containing any known release names
    is considered as a development branch based on master.
  - any CEPH_VERSION_SPEC which contains a known release name
    but not starting with that very release name is considered
    a deevlopment branch. so its CEPH_VERSION will be that
    release, and its CEPH_REF will be identical to CEPH_VERSION_SPEC.

  so we have following mappings:
  $FLAVOR => $CEPH_VERSION, $CEPH_REF, $CEPH_POINT_RELEASE
  master => master, master, ""
  octopus-123 => octopus, octops, "123"
  wip-octopus-123 => octopus, wip-octopus-123, ""
  wip-octopus=123 => octopus, wip-octopus-123, ""
  wip-octopus => octopus, wip-octopus, ""
  hello-octopus => octopus, hello-octopus, ""
  master => master, master, ""

Signed-off-by: Kefu Chai <[email protected]>
so it can specify the distro and its version if needed.

otherwise, we could be fetching packages of nautilus on el7 when
building container image of nautilus on el8.

Signed-off-by: Kefu Chai <[email protected]>
…ABLE_FLAVORS

since we are also building nautilus on centos8 and octopus on centos7,
instead of skipping the container image build for those builds, it'd be
better to enable them.

Signed-off-by: Kefu Chai <[email protected]>
we also build container images for nautilus on centos/8, but centos/8
does not ship python-rtslib, but it comes with python3-rtslib. so let's
use ALL/centos/daemon-base/__ISCSI_PACKAGE__ for nautilus/centos/8, and
specialize __ISCSI_PACKAGE__ for nautilus/centos/7.

Signed-off-by: Kefu Chai <[email protected]>
octopus is already a "python3 only" release, but centos7 is missing
quite a lot of python3 depdendencies for almost all of ceph-mgr-*
packages, like: ceph-mgr-rook and ceph-mgr-dashboard, the missing
dependencies are:

- python3-jsonpatch
- python3-routes
- python3-remoto
- python3-jinja2
- python3-jwt
- python3-kubernetes
- python3-scipy
- python3-cherrypy

since octopus built for RHEL/CentOS 7 is part of upgrade path, a fully
functional dashboard is not our priority, but we do need ceph-mgr is
critical. so let's just package ceph-mgr for octopus on el7.

Signed-off-by: Kefu Chai <[email protected]>
we also build container images for octopus on centos/7, but
centos/7 does not ship python3-rtslib, but it comes with python-rtslib. so
let's specialize __ISCSI_PACKAGE__ for octopus/centos/7 to use
python-rtslib instead.

Signed-off-by: Kefu Chai <[email protected]>
to silence SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Kefu Chai <[email protected]>
@dsavineau
dsavineau force-pushed the wip-build-nautilus-el7 branch from ae1a8bb to 4c1dec8 Compare October 27, 2020 19:05
@dsavineau

Copy link
Copy Markdown
Contributor

rebasing and fixing directory tree under ceph-releases/octopus/centos/7 (daemon-base dir was missing)

E261 at least two spaces before inline comment

Signed-off-by: Dimitri Savineau <[email protected]>
@dsavineau

Copy link
Copy Markdown
Contributor

The sloppy python job failure isn't related to the failure, I'll send a PR to ceph-build to fix this.

@dsavineau

Copy link
Copy Markdown
Contributor

jenkins flake8

@dsavineau

Copy link
Copy Markdown
Contributor

jenkins test ceph_ansible-all_daemons

@dsavineau
dsavineau merged commit 14858fb into ceph:master Oct 28, 2020
@tchaikov

Copy link
Copy Markdown
Contributor Author

@dsavineau thanks for reviewing, rebasing and fixing the issues!

@tchaikov
tchaikov deleted the wip-build-nautilus-el7 branch October 28, 2020 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants