GithubHelp home page GithubHelp logo

Comments (8)

daenney avatar daenney commented on May 8, 2024

What is the issue? The code line is barely legible and I can't actually deduce from it what is going on. A screenshot would go a long way here 😄.

from puppetboard.

wleese avatar wleese commented on May 8, 2024

Sorry about that, here you go:

http://imgur.com/BoRiC2H

Great tool by the way!

from puppetboard.

daenney avatar daenney commented on May 8, 2024

Wow. Actually, I'd say those facts are broken. The fact name suddenly contains HTML, that's not right. You're using the /facts endpoint which should basically return a list of facts, never any kind of value.

What does facter -p show on a machine that has those complex facts? I'm wondering if it's Facter output that's changed or if it's being stored incorrectly on PuppetDB.

To clarify, I would expect mwapp_entitlement_0_status to show up, not with the whole =HTML BLOB thing behind it.

from puppetboard.

wleese avatar wleese commented on May 8, 2024

The fact is correct and contains a html page.
Facter displays it as a string without linebreaks, which we replaced with
forward slash n, as part of the custom fact code.
On May 20, 2014 6:06 PM, "Daniele Sluijters" [email protected]
wrote:

Wow. Actually, I'd say those facts are broken. The fact name suddenly
contains HTML, that's not right. You're using the /facts endpoint which
should basically return a list of facts.

What does facter -p show on a machine that has those complex facts? I'm
wondering if it's Facter output that's changed or if it's being stored
incorrectly on PuppetDB.


Reply to this email directly or view it on GitHubhttps://github.com/nedap/puppetboard/issues/73#issuecomment-43602271
.

from puppetboard.

daenney avatar daenney commented on May 8, 2024

Well, having a Fact name show up with all the HTML is certainly not right so something weird is going on.

If you try the following, on a node that runs PuppetDB:

  • curl http://localhost:8080/v3/fact-names
  • curl http://localhost:8080/v3/node/$a_node_with_that_fact/facts

Feel free to scrub the output for sensitive things.

The second curl command should give you a list of Facts with their name and their value. Your fact should look like this:

{
  "certname" : "a_node_with_that_fact",
  "name" : "mwapp_entitlement_0_status",
  "value" : "<html><head><title>apache tomcat/6.0.26 - error report</title><style><!--h1 {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;font-size:22px;} h2 {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;font-size:16px;} h3 {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;font-size:14px;} body {font-family:tahoma,arial,sans-serif;color:black;background-color:white;} b {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;} p {font-family:tahoma,arial,sans-serif;background:white;color:black;font-size:12px;}a {color : black;}a.name {color : black;}hr {color : #525d76;}--></style> </head><body><h1>http status 401 - </h1><hr size="1" noshade="noshade"><p><b>type</b> status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>this request requires http authentication ().</u></p><hr size="1" noshade"
},

What I'm betting on is that we'll see the name of the fact contain the HTML which should be in the value key, not the name key, like this:

{
  "certname" : "a_node_with_that_fact",
  "name" : "mwapp_entitlement_0_status=<html><head><title>apache tomcat/6.0.26 - error report</title><style><!--h1 {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;font-size:22px;} h2 {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;font-size:16px;} h3 {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;font-size:14px;} body {font-family:tahoma,arial,sans-serif;color:black;background-color:white;} b {font-family:tahoma,arial,sans-serif;color:white;background-color:#525d76;} p {font-family:tahoma,arial,sans-serif;background:white;color:black;font-size:12px;}a {color : black;}a.name {color : black;}hr {color : #525d76;}--></style> </head><body><h1>http status 401 - </h1><hr size="1" noshade="noshade"><p><b>type</b> status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>this request requires http authentication ().</u></p><hr size="1" noshade",
  "value" : ""
},

from puppetboard.

wleese avatar wleese commented on May 8, 2024

Alright, will get back to you tomorrow with this output

from puppetboard.

wleese avatar wleese commented on May 8, 2024

So in the end it was indeed a bug in the fact name generation. Thanks for the time anyway and keep up the good work!

from puppetboard.

daenney avatar daenney commented on May 8, 2024

Glad I could help!

from puppetboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.