F5Networks / terraform-gcp-bigip-module

Terraform module for Deploying BIG-IP in GCP
Apache License 2.0
9 stars 13 forks source link

trap command is a component of bash and not an executable. #12

Closed cah-roger-bauer closed 2 years ago

cah-roger-bauer commented 2 years ago

/usr/bin/trap "rm -f $npipe" EXIT

file does not exist in folder

trinaths commented 2 years ago

@cah-roger-bauer - What is the real issue with this in terraform module ? Please give more info to investigate/understand this further.

cah-roger-bauer commented 2 years ago

when the system didnt build properly, troubleshooting line by line in the start us script led me to this. in the ;/usr/bin/ folder there is no executable "trap", hence it was not completing the command if you remove the /usr/bin from the line, it calls trap as its a subcomponent of the shell

trinaths commented 2 years ago

@cah-roger-bauer - seems like this is an system/infra issue. closing this now.

cah-roger-bauer commented 2 years ago

unsure of why you would close a ticket that is still an issue, someone should fix the tpl file, remove command that doesnt work -or put it in the proper way.

trinaths commented 2 years ago

@cah-roger-bauer please the steps to reproduce this issue. These steps help in reproduce this issue at our end.

cah-roger-bauer commented 2 years ago

!/bin/bash

Setup console and startup-script logging

LOG_FILE=/var/log/cloud/startup-script.log [[ -f $LOG_FILE ]] || /usr/bin/touch $LOG_FILE npipe=/tmp/$$.tmp

/usr/bin/trap "rm -f $npipe" EXIT <---- this will not function as the file /usr/bin/trap is not located in that folder, hence it cant do the 2nd portion of what is expected to do.

To verify TESTING:

ls /usr/bin/trap*

output: ls: cannot access trap: No such file or directory

or execute:

/usr/bin/trap "rm -f $npipe"

/usr/bin/mknod $npipe p /usr/bin/tee <$npipe -a $LOG_FILE /dev/ttyS0 & exec 1>&- exec 1>$npipe exec 2>&1

trinaths commented 2 years ago

Created INFRAANO-641 for internal PM tracking

RavinderReddyF5 commented 2 years ago

fixed in v1.1.2