Bug 2053751 - ztp-site-generate container is missing convenience entrypoint
Summary: ztp-site-generate container is missing convenience entrypoint
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Telco Edge
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.10.0
Assignee: Jim Ramsay
QA Contact: yliu1
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-11 22:33 UTC by Ian Miller
Modified: 2022-03-10 16:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:44:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:44:28 UTC

Description Ian Miller 2022-02-11 22:33:22 UTC
Description of problem: The ztp-site-generate container should have /usr/bin/entrypoints available as a convenience for the user. This file is missing 

# find / -name "*entrypoin*"                                                                             
/tmp/ztp-temp/ztp/resource-generator/entrypoints  
/tmp/ztp-temp/ztp/resource-generator/entrypoints/entrypoints
/usr/lib/python3.9/site-packages/pip/_internal/utils/entrypoints.py
/usr/lib/python3.9/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-39.pyc
find: ‘/proc/tty/driver’: Permission denied        


Version-Release number of selected component (if applicable): openshift4-ztp-site-generate:v4.10.0-27

How reproducible: Always


Steps to Reproduce:
1. See find command above

Actual results: see above


Expected results: /usr/bin/entrypoints exists


Additional info: There are sub-commands which go along with the entrypoint that also need to be available.

Comment 5 yliu1 2022-02-22 19:55:11 UTC
Verified with latest 4.10 image. 

[kni@ran-vcl01-installer ~]$ podman run -it registry.ran-vcl01.ptp.lab.eng.bos.redhat.com:5000/ztp/ztp-site-generator:4.10 cat /usr/bin/entrypoints
#!/bin/bash
cat <<EOF
ztp-site-generator container help
=================================

This container is the primary distribution mechanism for the Red Hat
Zero Touch Provisioning (ztp) solution.

The main container entrypoints are:

template and example distribution
---------------------------------

/home/ztp
  ├── argocd
  │   ├── deployment
  │   │   - Yaml files that configure the hub cluster and ArgoCD with our kustomize plugins
  │   └── example
  │       ├── policygentemplates
  │       │   - Example PolicyGenTemplate files for all supported DU configurations
  │       └── siteconfig
  │           - Example SiteConfig files for all supported cluster types
  ├── extra-manifest
  │   - The set of extra manifests that are applied at day-0 by SiteConfig
  └── source-crs
      - The set of CRs that are available to be configured via PolicyGenTemplate

You can export these templates and examples by running the following commands:

    $ podman run --rm ztp-site-generator:latest extract /home/ztp --tar | tar x -C ./out

extract
-------
EOF
extract --help

cat <<EOF

/extractKustomize.sh
-------------------

Used by the ArgoCD deployment patching logic, this entrypoint copies
the kustomize plugins for SiteConfig and PolicyGenTemplate and
aupporting resources into the proper kustomize directory structure.
EOF

[kni@ran-vcl01-installer ~]$ podman run --rm registry.ran-vcl01.ptp.lab.eng.bos.redhat.com:5000/ztp/ztp-site-generator:4.10  extract /home/ztp --tar | tar x -C ./out
[kni@ran-vcl01-installer ~]$ ls out/
argocd  extra-manifest  source-crs


[kni@ran-vcl01-installer ~]$ podman run -it registry.ran-vcl01.ptp.lab.eng.bos.redhat.com:5000/ztp/ztp-site-generator:4.10 ls -la /tmp/ztp-temp/
ls: cannot access '/tmp/ztp-temp/': No such file or directory

Comment 8 errata-xmlrpc 2022-03-10 16:44:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056


Note You need to log in before you can comment on or make changes to this bug.