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

ebuild.installed returns unhelpful errors #5393

Closed
kaithar opened this issue Jun 4, 2013 · 10 comments
Closed

ebuild.installed returns unhelpful errors #5393

kaithar opened this issue Jun 4, 2013 · 10 comments
Labels
Bug broken, incorrect, or confusing behavior P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around State-Module
Milestone

Comments

@kaithar
Copy link
Contributor

kaithar commented Jun 4, 2013

I don't know where the error is actually being formatted, but after digging it turns out this error:

State: - pkg
Name:      baseinstall
Function:  installed
    Result:    False
    Comment:   The following packages failed to install/update: <long package list here>. The following packages were already installed: <more packages here>.
    Changes:   

Is actually being generated by a missing keyword (clarification edit: a missing entry in the accept_keywords file, not anything within Salt). The way the comment is phrased gives the impression that the update failed /because/ the packages were already installed, rather than that being a separate bit of status information.

Any thoughts on how this could be made more helpful to the user? I had to run salt-minion in the foreground to find out what emerge was actually complaining about.

@basepi
Copy link
Contributor

basepi commented Jun 4, 2013

Thanks for the report.

As to how to fix it, any idea what you would want the output to look like?

@kaithar
Copy link
Contributor Author

kaithar commented Jun 4, 2013

That's the tricky bit... parsing the output of emerge to get a more accurate answer is a pain since it was intended to be read by humans.
In a perfect world the comments section would tell you the actual fault (in this case, "Keyword changes are necessary to proceed"), though I think that's unrealistic for the current design.
Might be helpful to have the output give something like "The system package manager returned an error for :" and then the actual command executed. The exact output is perhaps a bit much to send back, but maybe have it write the output to /var/log/salt/minion if the command fails?

@tmessi
Copy link
Contributor

tmessi commented Jun 5, 2013

I have been wanting to improve the output of the ebuild module for failure cases like this. I think it is possible to parse the output from emerge and provide some helpful details back to the user. Perhaps we can start by documenting the various failure cases (and some example emerge output would be a bonus).

@basepi
Copy link
Contributor

basepi commented Jun 5, 2013

@kaithar That's a good idea, to output the command that was executed and try to restrict the super-verbose output.

Now we just need an emerge expert to help us with all the failure cases! =P

@tmessi
Copy link
Contributor

tmessi commented Jun 5, 2013

Some off the top of my head:

  • keywords changes
  • use flag changes
  • license changes
  • mask changes
  • fetch failed
  • circular dependencies
  • blocked packages
  • fetch restricted
  • slot conflicts

techhat added a commit that referenced this issue Jun 7, 2013
Added output for package.unmask changes in ebuild. #5393
@thatch45
Copy link
Contributor

@shadowfax-chc when you have a moment can you please give us an update here? No rush :)

Thanks!

@tmessi
Copy link
Contributor

tmessi commented Oct 18, 2013

I haven't had a chance to address the last 3 errors in that list. They tend to be less common so I haven't had example output to work with. If anyone encounters an emerge error that salt doesn't handle, please provide the out put of the emerge command. For example, if pkg.install fails, provide the output of emerge --quiet --ask n <package>

Also I can start trying to craft some scenarios to make those errors repeatable.

@basepi
Copy link
Contributor

basepi commented Oct 18, 2013

That would be great! We've just been trying to clean up the issue list and wondered if there had been any undocumented progress on this issue. =)

basepi pushed a commit that referenced this issue Nov 8, 2013
Now reports blocked packages and slot conflicts. #5393
@kaithar
Copy link
Contributor Author

kaithar commented Nov 28, 2013

Recent pains have reminded me that qt is an excellent source of weird blockers.
Oracle Java is a nice manual fetch example.

@terminalmage
Copy link
Contributor

Looks like we still lack reporting for "fetch failed" and "circular dependencies"

@basepi basepi modified the milestones: Approved, Outstanding Bugs Apr 21, 2014
@rallytime rallytime added State-Module severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps and removed Low Severity labels Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around State-Module
Projects
None yet
Development

No branches or pull requests

7 participants