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

[dev.icinga.com #10989] Escaped sequences not properly generated with 'node update-config' #3858

Closed
icinga-migration opened this issue Jan 20, 2016 · 9 comments
Labels
area/cli Command line helpers bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10989

Created by GreenRover on 2016-01-20 07:18:35 +00:00

Assignee: jflach
Status: Resolved (closed on 2016-02-09 08:40:04 +00:00)
Target Version: 2.4.2
Last Update: 2016-02-23 09:58:42 +00:00 (in Redmine)

Icinga Version: 2.4.1
Backport?: Already backported
Include in Changelog: 1

On a slave node i have a config like:

apply Service "Linux Disk \"/\"" {
    check_command = "check_Linux Disk \"/\""

    ...
}

When i now do on master:
icinga2 node update-config

The /var/log/icinga2/startup.log
will contain:

/etc/icinga2/repository.d/hosts/xxxx/Linux Disk %22%2F%22.conf(1): object Service "Linux Disk "/"" {
                                                                                       ^^^^^^^^^^^^^^^^
/etc/icinga2/repository.d/hosts/xxxx/Linux Disk %22%2F%22.conf(2):  import "satellite-service"
/etc/icinga2/repository.d/hosts/xxxx/Linux Disk %22%2F%22.conf(3):  check_command = "dummy"

You have problems with qoutes on config replication.

Attachments

Changesets

2016-01-21 17:14:53 +00:00 by mfriedrich ddc1b25

Fix: Escaped sequences not properly generated with 'node update-config'

fixes #10989

2016-02-09 08:38:12 +00:00 by jflach 4d87c96

Refactor String-Escape in repositoryutility

fixes #10989

2016-02-09 14:59:19 +00:00 by jflach 58a31e8

Use ConfigWriter class in repositoryutility.cpp

refs #10989

2016-02-23 09:46:20 +00:00 by mfriedrich abce99d

Fix: Escaped sequences not properly generated with 'node update-config'

fixes #10989

2016-02-23 09:46:20 +00:00 by jflach 2052edf

Refactor String-Escape in repositoryutility

fixes #10989

2016-02-23 09:46:20 +00:00 by jflach 3b70bab

Use ConfigWriter class in repositoryutility.cpp

refs #10989

Relations:

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-01-21 08:09:02 +00:00

  • Category changed from Cluster to CLI

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-01-21 08:12:50 +00:00

  • Duplicates set to 10971

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-21 17:14:25 +00:00

  • File added ebf5ed8c49eb7465226d33cecd0e2a6b815144c136c89f5fb463097b65df0510.repo
  • File added 10989-hosts.zip
  • Subject changed from node update-config quote to Escaped sequences not properly generated with 'node update-config'
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.4.2

The JSON inside the repository is fine, the config writer used inside 'node update-config' cannot deal with escaped characters.

I've partially ported the solution from the new config writer, though the code inside repositoryutility.cpp still needs to be rewritten in large parts.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-21 17:20:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset ddc1b25.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-02-09 08:17:41 +00:00

  • Status changed from Resolved to Assigned

We should really use the ConfigWriter class for this.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-02-09 08:17:53 +00:00

  • Done % changed from 100 to 0

@icinga-migration
Copy link
Author

Updated by jflach on 2016-02-09 08:40:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 4d87c96.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-09 09:10:27 +00:00

  • Assigned to changed from mfriedrich to jflach

Thanks.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-02-23 09:58:42 +00:00

  • Backport? changed from Not yet backported to Already backported

@icinga-migration icinga-migration added bug Something isn't working area/cli Command line helpers labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.2 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Command line helpers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant