forseti-security / terraform-google-forseti

A Terraform module for installing Forseti on GCP
Apache License 2.0
132 stars 126 forks source link

forseti cron script fails because python do not have an alias #620

Closed e-koma closed 3 years ago

e-koma commented 3 years ago

There are 2 problems in the forseti cron script.

Condition

The first issue

run_forseti.sh which is forseti cron script fails because the python command does not have an alias. (In fact, the startup-script runs python3 directly )

$ forseti model get ${MODEL_NAME} | python -c \"import sys, json; print json.load(sys.stdin)['status']\"

python: command not found

The second issue.

the syntax does not support python3.

run_forseti.sh uses the python2 syntax, so even if run it with python3, get a syntax error. python3 print method requires (). (this is a problem on the forseti side, not on the terraform side, so I will propose an Issue to forseti repository)

$ forseti model get ${MODEL_NAME} | python3 -c \"import sys, json; print json.load(sys.stdin)['status']\"

syntax error
e-koma commented 3 years ago

I suggested that run_forseti.sh should use python3 directly. because docker environment uses python3 directly

If the proposal is accepted, this Issue will be closed.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.