Remote CLI client failing due to old k8s client

Bug #1955427 reported by Thiago Oliveira Miranda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Thiago Oliveira Miranda

Bug Description

Brief Description

After installing the Remote CLI client, the user is unable to run the command 'kubectl apply -f ' correctly. The command returns an error message related to the resources. The k8s client version in the remote CLI client is older than the system. It should be upgraded.

Severity

<Major: System/Feature is usable but degraded>

Steps to Reproduce

Follow the steps here to install the remote-cli:
https://opendev.org/starlingx/clients/src/branch/master/remote_cli

Then check the kubectl version.

Expected Behavior

kubectl version --short

Client Version: v1.21.3
Server Version: v1.21.3

Actual Behavior

kubectl version --short

Client Version: v1.5.2
Server Version: v1.21.3

Reproducibility
yes

System Configuration

all configurations

Branch/Pull Time/Commit

Branch and the time when code was pulled or git commit or cengn load info

Last Pass
-

Timestamp/Logs
-

Alarms

No alarms

Test Activity

[Regression Testing]

Workaround
-

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to upstream (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/upstream/+/822356

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to clients (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/clients/+/822360

description: updated
Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.clients
Revision history for this message
Ghada Khalil (gkhalil) wrote :

screening: stx.7.0 / medium; issue with the remote-cli related to the k8s upversion in stx.6.0. However, this issue is not critical enough to block the stx.6.0 release as the use of the remote-cli is fairly limited. Users can run the cmds locally on their system. Therefore, the plan is to address in the stx master branch only.

Changed in starlingx:
importance: Undecided → Medium
assignee: nobody → Thiago Oliveira Miranda (thiagooliveiramiranda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to upstream (master)

Reviewed: https://review.opendev.org/c/starlingx/upstream/+/822356
Committed: https://opendev.org/starlingx/upstream/commit/eab2740420233bb78c176c9efc8cdf7d98dd4b7f
Submitter: "Zuul (22348)"
Branch: master

commit eab2740420233bb78c176c9efc8cdf7d98dd4b7f
Author: Thiago Miranda <email address hidden>
Date: Mon Dec 20 15:07:15 2021 -0500

    Fix old kubectl client in stx-platformclients (from 1.5.2 to 1.21.3)

    The actual kubernetes-client is in a much older version due to a
    diferent version that is installed in the docker image.

    As the new client change its name for kubernetes-1.21.3-client, the
    version we are downloading is a older release that is downloaded
    from the "extras" repository in the CentOS 7.

    This commit fix the package name and version. The problem is that the
    rpm spec change the default binary location to:
    /usr/local/kubernetes/1.21.3/stage2/usr/bin/kubectl.

    So to fix this we still have to link kubectl to /usr/bin using the
    CUSTOMIZATION variable.

    Partial-Bug: #1955427

    Signed-off-by: Thiago Miranda <email address hidden>
    Change-Id: If68f397b9ced685b9a2631057f2dd0aca3667709

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to clients (master)

Reviewed: https://review.opendev.org/c/starlingx/clients/+/822360
Committed: https://opendev.org/starlingx/clients/commit/2ca858a604241a596fc9a4ff1a26ee5b788df1ac
Submitter: "Zuul (22348)"
Branch: master

commit 2ca858a604241a596fc9a4ff1a26ee5b788df1ac
Author: Thiago Miranda <email address hidden>
Date: Mon Dec 20 14:33:45 2021 -0500

    Change the entrypoint of the image to always use bash

    To fix the kubectl version in the commit that it depends on, the
    CUSTOMIZATION variable of the file
    stx-platformclients.stable_docker_image had to be used.

    But when we are building a new image with CUSTOMIZATION, the
    build-stx-images.sh script put a CMD ["bash"] in the image, making the
    old way to call commands in stx-platformclients to no longer work.

    This commit solves this issue, by forcing the entrypoint to always
    use bash and making all commands run as with "bash -c <command>"

    Test Plan:
    - Tested this change with new and old stx-platformclients versions.
      It work with the image that has the kubectl fix and the older ones.

    Partial-Bug: #1955427
    Depends-on: https://review.opendev.org/c/starlingx/upstream/+/822356

    Signed-off-by: Thiago Miranda <email address hidden>
    Change-Id: Ieae227daee875bc4b4b42509cbcb78350360d02c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to root (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/root/+/824558

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to clients (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/clients/+/824561

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/c/starlingx/root/+/824558
Committed: https://opendev.org/starlingx/root/commit/ac5d0b869fafd342aa7c97329004cf462953db80
Submitter: "Zuul (22348)"
Branch: master

commit ac5d0b869fafd342aa7c97329004cf462953db80
Author: Thiago Miranda <email address hidden>
Date: Thu Jan 13 07:37:41 2022 -0500

    Update stx-platformclients tag to stx.7.0-v1.5.4

    This commit updates the image with the updated clients and the fix of
    the old kubectl version. It was in the 1.5.4, now its updated to the
    correct version 1.21.3.

    Partial-Bug: #1955427

    Signed-off-by: Thiago Miranda <email address hidden>
    Change-Id: If48a80db269a67bd97aa56bcdd2e612e2ccdcd98

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to clients (master)

Reviewed: https://review.opendev.org/c/starlingx/clients/+/824561
Committed: https://opendev.org/starlingx/clients/commit/73a868d45dafa983c39e9c1f91c77dd16608d0a2
Submitter: "Zuul (22348)"
Branch: master

commit 73a868d45dafa983c39e9c1f91c77dd16608d0a2
Author: Thiago Miranda <email address hidden>
Date: Thu Jan 13 07:48:24 2022 -0500

    Update stx-platformclients image to version stx.7.0-v1.5.4

    Updated image with the new fixes since the last build and fixes the
    kubectl version from 1.5.4 to 1.21.3.

    Closes-Bug: #1955427
    Depends-On: https://review.opendev.org/c/starlingx/root/+/824558

    Signed-off-by: Thiago Miranda <email address hidden>
    Change-Id: I90840cd61fa0b61b586fa28ca762159fb686a707

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.