GithubHelp home page GithubHelp logo

oamg / rhc-worker-script Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 7.0 337 KB

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

Makefile 4.60% Python 3.12% Go 92.28%

rhc-worker-script's People

Contributors

andywaltlova avatar dependabot[bot] avatar pre-commit-ci[bot] avatar ptoscano avatar r0x0d avatar spytec avatar tcullum-rh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rhc-worker-script's Issues

Reduce summary and description length and address lint errors

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 verify_yaml:true and insights_core_gpg_check:false worker fails and doesn't execute signed script

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--

Release source points to 404 Not Found

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              

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.