8000 Fix anamon invalid type when sending logs by ckotte · Pull Request #3326 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix anamon invalid type when sending logs #3326

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

Merged
merged 3 commits into from
Apr 29, 2023
Merged

Conversation

ckotte
Copy link
Contributor
@ckotte ckotte commented Jan 13, 2023

Linked Items

Fixes #3324

Description

Fixes anamon invalid type issue.

Behaviour changes

Same as before.

Category

This is related to a:

  • Bugfix
  • Feature
  • Packaging
  • Docs
  • Code Quality
  • Refactoring
  • Miscellaneous

Tests

  • Unit-Tests were created
  • System-Tests were created
  • Code is already covered by Unit-Tests
  • Code is already covered by System-Tests
  • No tests required

@github-actions github-actions bot added the API label Jan 13, 2023
@codecov
Copy link
codecov bot commented Jan 16, 2023

Codecov Report

Patch coverage: 67.99% and project coverage change: +65.31 🎉

Comparison is base (5c76a58) 0.19% compared to head (17ab177) 65.50%.

❗ Current head 17ab177 differs from pull request most recent head 9c6430f. Consider uploading reports for the commit 9c6430f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            main    #3326       +/-   ##
==========================================
+ Coverage   0.19%   65.50%   +65.31%     
==========================================
  Files         93      113       +20     
  Lines      12983    15155     +2172     
==========================================
+ Hits          25     9928     +9903     
+ Misses     12958     5227     -7731     
Impacted Files Coverage Δ
cobbler/api.py 71.52% <ø> (+71.52%) ⬆️
cobbler/cexceptions.py 100.00% <ø> (+100.00%) ⬆️
cobbler/cobblerd.py 0.00% <0.00%> (ø)
cobbler/items/item.py 87.71% <ø> (+87.71%) ⬆️
cobbler/items/menu.py 83.07% <ø> (ø)
cobbler/items/mgmtclass.py 90.62% <ø> (+90.62%) ⬆️
cobbler/items/package.py 94.11% <ø> (+94.11%) ⬆️
cobbler/items/profile.py 95.36% <ø> (+95.36%) ⬆️
cobbler/items/repo.py 85.35% <ø> (+85.35%) ⬆️
cobbler/items/resource.py 92.64% <ø> (ø)
... and 103 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@SchoolGuy SchoolGuy added this to the v3.4.0 milestone Feb 2, 2023
@SchoolGuy SchoolGuy marked this pull request as draft March 13, 2023 13:43
@SchoolGuy SchoolGuy self-assigned this Apr 5, 2023
@SchoolGuy
Copy link
Member

I will in the following days take care of this PR. This requires more testing and thus will be non-trivial.

@SchoolGuy
Copy link
Member

I need to test the ideas I implemented in the temporary commit. I will try to do so in the near future...

@SchoolGuy
Copy link
Member

Sigh... Testing this is harder than thought.

  1. openSUSE's cloud-init is broken (which means for an automated Cobbler server setup with Terraform I need to use Ubuntu).
  2. Resizing volumes with Terraform doesn't work very well since the size needs to be in bytes.
  3. Fedora 38 is missing from the signatures in 3.3.3 (thus it is not importable per-default).
  4. There was a problem with the Specfile that prevented Cobbler from being installable on newer Ubuntu versions.

I will still continue trying to test this. Missing signatures can be easily fixed... Let's see how far I am able to progress today.

@SchoolGuy
Copy link
Member
SchoolGuy commented Apr 23, 2023

Update for bug validation:

@SchoolGuy
Copy link
Member

During the testing, I found an orthogonal bug that will be included in this PR (and the backport): Autoinstallations that are using profiles cannot save the files because of the increased validation.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 23, 2023
@SchoolGuy
Copy link
Member

Python3 tests with Fedora38 were successful. Sadly the tests with CentOS 7 were unsuccessful and as such I need to find out why I get passed a str by the client.

The intermediate step to convert this to a str is not needed. We can just write the files as-is directly to the drive. The advantage is that Python 2 and Python 3 behave the same in this regard and as such we don't need to worry about backwards compability.
@SchoolGuy
Copy link
Member
SchoolGuy commented Apr 29, 2023

I was able with this code to push files over the wire with both a CentOS 7 and Fedora 38. I will - just to be sure test now how this behaves with something ancient like CentOS 5.

@SchoolGuy
Copy link
Member

I was not able to get older OS versions to run correctly. Since newer versions are working and the code should work identical on older OS versions with Python 2 only, I will merge this PR now.

@SchoolGuy SchoolGuy marked this pull request as ready for review April 29, 2023 09:51
@SchoolGuy SchoolGuy merged commit af70a5d into cobbler:main Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Anamon cannot send logs to cobbler server
2 participants
0