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

[BUG] error logging into registry: fork/exec /root/.hauler/cosign: operation not permitted #360

Closed
ertimas opened this issue Nov 11, 2024 · 11 comments · Fixed by #354
Closed
Labels
bug Something isn't working

Comments

@ertimas
Copy link

ertimas commented Nov 11, 2024

Environmental Info:

Linux rke2-server 5.15.0-209.161.7.2.el8uek.x86_64 #2 SMP Tue Aug 20 10:44:07 PDT 2024 x86_64 x86_64 x86_64 GNU/Linux

Hauler Version:

image

Describe the Bug:

hauler login fails, where cosign login/ctr login/crictl login succeed.

Steps to Reproduce:

  1. Create VM with Oracle Linux 8, with a single network interface, connected to the internet
  2. curl -sfL https://get.hauler.dev | bash
  3. hauler login regsitry1.dso.mil -u <my username> -p <my password>

Expected Behavior:

Receive a login succeeded messaeg.

Actual Behavior:

Here is a screenshot demonstrating hauler failing to login (left terminal) while ctr is able to login and pull an image (right terminal).
image

Here is an example of using cosign, which was installed along with hauler, to login to the target repository.
image

Additional Context:

As of ~3 weeks ago I had another VM and was able to install hauler via the command listed above, login to the registry, and add images to my image store. That is to say-- this is new behavior.

@ertimas ertimas added the bug Something isn't working label Nov 11, 2024
@github-project-automation github-project-automation bot moved this to To Triage in Hauler Nov 11, 2024
@zackbradys
Copy link
Member

zackbradys commented Nov 11, 2024

Hey @ertimas, in your first screenshot, on the left terminal, it looks like you have a typo in the command/flag and that's probably why hauler failed to accept it. You have -password instead of --password or -p.

Please try again and let us know!

@ertimas
Copy link
Author

ertimas commented Nov 11, 2024

Ah-- I failed to post the correct screenshot
image
Sorry @zackbradys please see this one

@zackbradys
Copy link
Member

Ah that would do it! Unfortunately this is more a limitation than a bug and shouldn't be a new issue to v1.1.0...

Basically hauler is unable to open multiple connections to the cosign binary. If you have multiple concurrent processes running with hauler, then one of them fail. If you stop any other processes using hauler and try the command again, it should work for you. Feel free to check with something like ps aux | grep hauler

@zackbradys
Copy link
Member

We're actively looking at how we leverage cosign, since we don't use much of it, and should be addressed relatively soon... our recommendation is try not to run multiple concurrent processes at the same time...

Feel free to add any thoughts to Discussion #358

@github-project-automation github-project-automation bot moved this from To Triage to Resolved in Hauler Nov 12, 2024
@ertimas
Copy link
Author

ertimas commented Nov 12, 2024

So Hauler Fileserver and Hauler Registry can't be run at the same time @zackbradys?

@zackbradys
Copy link
Member

No the registry and fileserver can be run at the same time... It is only anything that leverages the cosign binary. I will get a list together and update the docs here -> https://docs.hauler.dev/docs/known-limits#limitations

@ertimas
Copy link
Author

ertimas commented Nov 12, 2024

Running "multiple concurrent processes" stemmed from the implementation in Hauler it seems since cosign ran fine on its own and I simply ran hauler login to generate the error.

@dweomer
Copy link
Contributor

dweomer commented Nov 12, 2024

Hi @ertimas, @zackbradys and I are discussing this on a call. Initially, @zackbradys was thinking you were running into the error originally described in #211 (since captured in #361) but it looks more likely that the problem for you is #249. We are working on a short-term work-around for this embodied in #354

@dweomer dweomer reopened this Nov 12, 2024
@github-project-automation github-project-automation bot moved this from Resolved to In Progress in Hauler Nov 12, 2024
@dweomer dweomer linked a pull request Nov 12, 2024 that will close this issue
3 tasks
@dweomer dweomer changed the title [BUG] [BUG] error logging into registry: fork/exec /root/.hauler/cosign: operation not permitted Nov 12, 2024
@ertimas
Copy link
Author

ertimas commented Nov 13, 2024

@dweomer thank you! I'll try #354

@ertimas
Copy link
Author

ertimas commented Nov 13, 2024

Meant to close

@ertimas ertimas closed this as completed Nov 13, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Resolved in Hauler Nov 13, 2024
@ertimas
Copy link
Author

ertimas commented Nov 13, 2024

Just an FYI-- turns out fapolicy was preventing cosign from running... My bad team. Added a rule and it worked immediately

echo "allow perm=executable uid=<user> : path=<user_home/.hauler/cosign" >> /etc/fapolicyd/rules.d/80-cosign-rule.rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Resolved
Development

Successfully merging a pull request may close this issue.

3 participants