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

Pre-onboard restjavad memory with 1nic GCP autoscale mig Unable to detect a Project Id #43

Open
JeffGiroux opened this issue Apr 7, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@JeffGiroux
Copy link

Using runtime init with a 1nic GCP managed instance group is causing errors with project ID lookup. I find that if I use pre-onboard to increase restajavad memory then I have issues.

pre_onboard_enabled:
  - name: provision_rest
    type: inline
    commands:
      - /usr/bin/setdb provision.extramb 1024
      - /usr/bin/setdb restjavad.useextramb true

error...

2022-04-07T23:00:33.080Z [19883]: info: Resolving parameters
2022-04-07T23:00:47.202Z [19883]: error: Error getting project id Unable to detect a Project Id in the current environment. 
To learn more about authentication and Google APIs, visit: 
https://cloud.google.com/docs/authentication/getting-started

Workaround

I inspected the GDM v2 bigip templates and noticed that the restjavad settings are configured much earlier in the bash script. I did the same, and now my autoscale example works each time.

# Optional optimizations required as early as possible in boot sequence before MCDP starts up.
# JeffGiroux - If placed into runtime init pre-onboard,
#              you receive error "Error getting project
#              ID Unable to detect a Project Id in the
#              current environment"
echo "Provisioning extra restjavad memory"
/usr/bin/setdb provision.extramb 1024
/usr/bin/setdb restjavad.useextramb true

Troubleshooting

I set an admin password early during onboarding so when runtime init failed, I can login via ssh still and tshoot. I found that I was able to manually run the script /config/cloud/run_runtime_init.sh via CLI on the BIG-IP and it went through successfully. I figured this had to be a timing issue with 1nic and lack of nic swap maybe? Not sure. My other terraform GCP examples are all 3nic, so there is a nic swap involved. I don't see how moving restjavad memory outside of pre-onboard...essentially at top of bash script...helps resolve.

successful logs with workaround...

2022-04-07T23:35:25.235Z [19769]: info: Executing custom pre_onboard_enabled commands
2022-04-07T23:35:25.255Z [19769]: info: Executing inline shell command: tmsh modify auth user admin password Default12345!
2022-04-07T23:35:26.601Z [19769]: info: Shell command: tmsh modify auth user admin password xxxxx execution completed; response: 
2022-04-07T23:35:26.672Z [19769]: info: Resolving parameters
2022-04-07T23:35:27.786Z [19769]: info: Executing install operations.
2022-04-07T23:35:27.800Z [19769]: info: Installing - do v1.28.0
2022-04-07T23:35:30.240Z [19769]: info: Validating - do extension is available.
2022-04-07T23:35:40.278Z [19769]: info: Installing - as3 v3.35.0
2022-04-07T23:35:43.706Z [19769]: info: Validating - as3 extension is available.
2022-04-07T23:36:12.764Z [19769]: info: Executing service operations.
2022-04-07T23:36:12.780Z [19769]: info: Creating - do v1.28.0 ...........
snippet...
2022-04-07T23:37:25.766Z [19769]: info: Sending f5-teem report
2022-04-07T23:37:25.770Z [19769]: info: All operations finished successfully
@shyawnkarim
Copy link

Thanks for reporting this issue. It is being tracked with internal ID, ESECLDTPLT-3112.

@shyawnkarim shyawnkarim added the bug Something isn't working label Jun 7, 2022
@shyawnkarim shyawnkarim added this to the backlog milestone Jun 7, 2022
@amolari
Copy link

amolari commented Aug 10, 2022

@shyawnkarim The documentation is confusing. There are examples where the extramb is set in the preonboard phase, and some where it is set earlier (as in this Git). Could the documentation/examples be aligned on what is the proper solution to run (or at least a notice in the documentation, if it's a cloud-specific issue)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants