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

Basket snapshots doesn't work after upgrade to 1.10.x #2644

Closed
stevie-sy opened this issue Oct 24, 2022 · 8 comments
Closed

Basket snapshots doesn't work after upgrade to 1.10.x #2644

stevie-sy opened this issue Oct 24, 2022 · 8 comments
Assignees
Labels
Milestone

Comments

@stevie-sy
Copy link

Since upgrading to 1.10.x creating snapshots with the basket doesn't work anymore. It doesn't matter in the UI or with the CLI.

Error in the UI:
image

error running the CLI:
ERROR: Icinga\Module\Director\Exception\JsonEncodeException in /usr/share/icingaweb2/modules/director/library/Director/Exception/JsonException.php:12 with message: Malformed UTF-8 characters, possibly incorrectly encoded

Your Environment

  • Director version (System - About):
  • Icinga Web 2 version and modules (System - About): 2.11.1
  • Icinga 2 version (icinga2 --version): 2.13.5
  • Operating System and version: CentOS 7
  • Webserver, PHP versions: Apache, rh-php 7.3
@Thomas-Gelf
Copy link
Contributor

I'm unable to reproduce this, tried to snapshot a couple of baskets, works fine over here. Could you please create your snapshot on CLI with --trace? Blind guess: some object type manages it to ship a binary UUID where it shouldn't

@Thomas-Gelf
Copy link
Contributor

What kind of objects do you have in your basket? I'm able to reproduce this, when I add "Basket Definitions" to my basket. Is this the case for your setup? And if so, could you please test whether the error disappears, when you remove them from the basket?

@Thomas-Gelf
Copy link
Contributor

NB: as the error message is not very helpful, when tracking down such errors, I pushed a related improvement with #2646. The error would now look as follows:

image

@Thomas-Gelf Thomas-Gelf self-assigned this Oct 25, 2022
@Thomas-Gelf Thomas-Gelf added this to the v1.10.2 milestone Oct 25, 2022
@Thomas-Gelf
Copy link
Contributor

Thomas-Gelf commented Oct 25, 2022

Issue has been fixed and cherry-picked to support/1.10, will be released with v1.10.2. This should have affected only Baskets containing Baskets. As a workaround, remove Baskets from your Basket. As a quick-fix, please apply this little patch.

Thanks for reporting this!

@stevie-sy
Copy link
Author

Hi Tom,

do you need any further information or can I see this as fixed. You wrote in short time so many comments. :-)

@Thomas-Gelf
Copy link
Contributor

Hi @stevie-sy,

I'm pretty confident to have caught the root cause of this issue. Did your basket contain Basket definitions? You could apply the patch if you want, and let me know, whether it helped to fix your problem - it's just a single line.

In case similar problems occurs again, v1.10.2 will provide better error handling, being able to show more related details.

Cheers,
Thomas

@stevie-sy
Copy link
Author

Here are are some screenshots of the basket defination to backup the director config as json beside a db-backup:
image
image
image

and the line from our backup script:

/usr/bin/icingacli director basket snapshot --name "$basket" > /dev/null
/usr/bin/icingacli director basket dump --name "$basket" >  $TARGETDIR/$NOW\-director.json

With the one liner patch it work like before and expected. Thank you

@Thomas-Gelf
Copy link
Contributor

Thanks for testing and letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants