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

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

Open
usernamenotused opened this issue Jul 28, 2021 · 1 comment
Open

Comments

@usernamenotused
Copy link

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

@m-czernek
Copy link
Contributor

Sounds like you might be using an older version of the course. In the course, kill.sh should contain:

#!/bin/bash

source /usr/local/etc/ocp4.config

APP_URL=probes-${RHT_OCP4_DEV_USER}-probes.${RHT_OCP4_WILDCARD_DOMAIN}
curl http://$APP_URL/flip?op=kill-health
curl http://$APP_URL/flip?op=kill-ready

Try to delete and re-create your learning environment to see if you get the proper script version.

Also feel free to create a ROL ticket.

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

No branches or pull requests

2 participants