Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging for error cases while building the node image #72

Open
shivamsamarth opened this issue Oct 26, 2023 · 0 comments
Open

Add logging for error cases while building the node image #72

shivamsamarth opened this issue Oct 26, 2023 · 0 comments

Comments

@shivamsamarth
Copy link

Building the node image doesn't log for the error conditions and it simply stops without providing any information regarding the actual error.
For example, if we build with incorrect HOST_IP parameter:

$ make build-node-image KUBERNETES_VERSION=v1.26.5+vmware.2-fips.1 OS_TARGET=photon-3 TKR_SUFFIX=byoi IMAGE_ARTIFACTS_PATH=$HOME/images HOST_IP=1.2.3.4
sha256:d64a60cc9a0937d1e03796809e3386aaff2ef2bc26b1f978c1f61a3edb49a4a9
Using default port for artifacts container 8081
Using default Packer HTTP port 8082
v1.26.5---vmware.2-fips.1-photon-3-image-builder
620dce058b414f31f7820c215d7cbfaf2cd5049eaf2b59533d4018ca656ba7ed

 Hint: Use "docker logs -f v1.26.5---vmware.2-fips.1-photon-3-image-builder" to see logs and status
 Hint: Node Image OVA can be found at /root/images/ovas

The docker logs only contain the following messages:

$ docker logs -f v1.26.5---vmware.2-fips.1-photon-3-image-builder
+ image_builder_root=/image-builder/images/capi
+ default_packer_variables=/image-builder/images/capi/image/packer-variables/
+ packer_configuration_folder=/image-builder/images/capi
+ tkr_metadata_folder=/image-builder/images/capi/tkr-metadata/
+ custom_ovf_properties_file=/image-builder/images/capi/custom_ovf_properties.json
+ artifacts_output_folder=/image-builder/images/capi/artifacts
+ ova_destination_folder=/image-builder/images/capi/artifacts/ovas
+ photon3_stig_compliance=false
+ main
+ copy_custom_image_builder_files
+ cp image/hack/tkgs-image-build-ova.py hack/image-build-ova.py
+ cp image/hack/tkgs_ovf_template.xml hack/ovf_template.xml
+ download_configuration_files
+ wget -q http://1.2.3.4:8081/artifacts/metadata/kubernetes_config.json

From the above logs, it is not evident why the build did not generate any OVA.
The ask is to provide relevant error log messages for any failures reported in build-ova.sh.

In addition to above, there is a minor request to update the Readme with the HOST_IP parameter description which is available in the make help command.

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

No branches or pull requests

1 participant