Skip to content

kill.sh curl request get var doesn't match req.query.op values. #156

@usernamenotused

Description

@usernamenotused

kill.sh contents:
#!/bin/bash
source /usr/local/etc/ocp4.config
APP_URL=probes-${RHT_OCP4_DEV_USER}-probes.${RHT_OCP4_WILDCARD_DOMAN}
curl http://$APP_URL/flip?op=kill

But apps.js contents:
// This route handles switching the state of the app
route.route('/flip').get(function (req, res) {
var flag = req.query.op;
if (flag === 'kill-health') {
console.log('Received kill request for health probe.');
healthy = false;
res.send('Switched app state to unhealthy...\n');
} else if (flag === "awaken-health") {
console.log('Received awaken request for health probe.');
healthy = true;
res.send('Switched app state to healthy...\n');
} else if (flag === 'kill-ready') {
console.log('Received kill request for readiness probe.');
ready = false;
res.send('Switched app state to not ready...\n');
} else if (flag === 'awaken-ready') {
console.log('Received awaken request for readiness probe.');
ready = true;
res.send('Switched app state to ready...\n');
} else {
res.send('Error! unknown flag...\n');
}
});

there is no value for op=kill

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions