oamg / rhc-worker-script Goto Github PK
View Code? Open in Web Editor NEWRemote Host Configuration (rhc) worker for executing an interpreted programming language script on hosts managed by Red Hat Insights.
License: GNU General Public License v3.0
Remote Host Configuration (rhc) worker for executing an interpreted programming language script on hosts managed by Red Hat Insights.
License: GNU General Public License v3.0
When doing srpm releases downstream we run into errors about summary and description being too long, these should all be addressed if possible
rhc-worker-bash on rhel-7.9 [+?]
❯ rhpkg lint
Mockbuild results directory not found. Linting local build results.
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
/usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
/etc/xdg/rpmlint/fedora-legacy-licenses.toml
/etc/xdg/rpmlint/fedora-spdx-licenses.toml
/etc/xdg/rpmlint/fedora.toml
/etc/xdg/rpmlint/scoring.toml
/etc/xdg/rpmlint/users-groups.toml
/etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 2
rhc-worker-bash.src: E: summary-too-long Remote Host Configuration (rhc) worker for executing bash scripts on hosts managed by Red Hat Insights.
rhc-worker-bash.src: W: summary-ended-with-dot Remote Host Configuration (rhc) worker for executing bash scripts on hosts managed by Red Hat Insights.
rhc-worker-bash.src: E: description-line-too-long Remote Host Configuration (rhc) worker for executing bash scripts on hosts managed by Red Hat Insights.
1 packages and 1 specfiles checked; 2 errors, 1 warnings, 2 badness; has taken 0.1 s
Could not execute lint: Failed to execute command.
when isights-client gpg check is False but overall verification still True worker fails with IO error, expected would be that the playbook is still send for verification and the --no-gpg
param only affects behavior of insights-client.
When both config values true, or verify false everything works as expected.
[rhcd] 2023/11/01 17:00:47 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] 2023/11/01 17:00:47 server.go:44: Processing received yaml data
[rhcd] 2023/11/01 17:00:47 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] 2023/11/01 17:00:47 runner.go:45: Calling insights-client with --no-gpg to skip signature validation...
[rhcd] 2023/11/01 17:00:47 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/grpc.go:172: dispatched message 1b75f3e0-98fd-4f65-9c20-8995dabc6562 to worker rhc-worker-script
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] 2023/11/01 17:00:51 runner.go:75: Unable to verify yaml file: Error sending data
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] Traceback (most recent call last):
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] File "/etc/insights-client/rpm.egg/insights/client/apps/ansible/playbook_verifier/contrib/gnupg.py", line 156, in _copy_data
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] outstream.write(data)
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] IOError: [Errno 32] Broken pipe
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] exit status 1
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] 2023/11/01 17:00:51 server.go:48: Creating payload for message 1b75f3e0-98fd-4f65-9c20-8995dabc6562
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] 2023/11/01 17:00:51 util.go:58: Writing form-data for executed script:
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] 2023/11/01 17:00:51 util.go:79: form-data created, returning body: --8873589eb80926f8e12ab250565f592e7340520054306a47878d065d840e
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] Content-Disposition: form-data; name="file"; filename="rhc-worker-script-output.tar.gz"
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] Content-Type: application/vnd.redhat.tasks.filename+tgz
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker]
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] {"correlation_id":"00000000-0000-0000-0000-000000000000","stdout":"Signature of yaml file is invalid"}
[rhcd] 2023/11/01 17:00:51 /builddir/build/BUILD/rhc-0.2.0/cmd/yggd/exec.go:59: [/usr/libexec/rhc/rhc-script-worker] --8873589eb80926f8e12ab250565f592e7340520054306a47878d065d840e--
In the specfile, Source0
should point to the .tar.gz
file that the build is based on, it looks like it doesn't work correctly right now
rhc-worker-bash on rhel-7.9 [?] took 42s
❯ spectool --get-files --all *.spec
Downloading: https://github.com/oamg/rhc-worker-bash/releases/download/v0.1/rhc-worker-bash-0.1.tar.gz
Download failed:
404 Client Error: Not Found for url: https://github.com/oamg/rhc-worker-bash/releases/download/v0.1/rhc-worker-bash-0.1.tar.gz
- 0.0 B Elapsed Time: 0:00:00
Similarly to rhc-worker-playbook, create config file to adjust worker behavior if needed (and replace env variables in main.go with loaded config)
Don't forget that it needs to be included in the build
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.