F5Networks / f5-google-gdm-templates-v2

Google Deployment Templates for quickly deploying BIG-IP services in Google Cloud Platform
5 stars 12 forks source link

fast extension is available - deployment fails #17

Open JeffGiroux opened 1 year ago

JeffGiroux commented 1 year ago

Describe the bug

Deploying standalone template and the startup log shows a failure to onboard due to FAST extension not available.

error...

2022-11-03T23:29:57.153Z [3042]: info: Configuration file: /config/cloud/runtime-init-conf.yaml
2022-11-03T23:29:57.176Z [3042]: info: Processing controls parameters
2022-11-03T23:29:57.180Z [3042]: info: Validating provided declaration
2022-11-03T23:29:57.289Z [3042]: info: Successfully validated declaration
2022-11-03T23:29:57.377Z [3042]: info: Resolving parameters
2022-11-03T23:29:58.428Z [3042]: info: Executing install operations.
2022-11-03T23:29:58.439Z [3042]: info: Installing - do 1.33.0
2022-11-03T23:30:02.182Z [3042]: info: Validating - do extension is available.
2022-11-03T23:30:15.223Z [3042]: info: Installing - as3 3.40.0
2022-11-03T23:30:19.567Z [3042]: info: Validating - as3 extension is available.
2022-11-03T23:30:54.873Z [3042]: info: Installing - ts 1.32.0
2022-11-03T23:31:01.831Z [3042]: info: Validating - ts extension is available.
2022-11-03T23:31:11.851Z [3042]: info: Installing - fast 1.21.0
2022-11-03T23:31:14.675Z [3042]: info: Validating - fast extension is available.

Expected behavior

All extensions should be available and working so the rest of onboard can continue.

Current behavior

FAST extension fails so the rest of it fails

Possible solution

Remove FAST install if not using in declaration.

Steps to reproduce

  1. choose standalone quickstart template
  2. deploy as-is according to README
  3. deployment manager will show success, but bigip onboard logs show FAST failure

Screenshots

Context

cannot deploy big-ip without a workaround

Your Environment

---
imports:
  - path: quickstart.py
  - path: ../modules/application/application.py
  - path: ../modules/bastion/bastion.py
  - path: ../modules/bigip-standalone/bigip_standalone.py
  - path: ../modules/dag/dag.py
  - path: ../modules/network/network.py
resources:
  - name: quickstart-py
    properties:
      bigIpImageName: f5-bigip-16-1-3-2-0-0-4-payg-best-plus-1gbps-220914234533
      bigIpRuntimeInitConfig: >-
        https://raw.githubusercontent.com/F5Networks/f5-google-gdm-templates-v2/v2.6.0.0/examples/quickstart/bigip-configurations/runtime-init-conf-3nic-payg-with-app.yaml
      numNics: 3
      owner: name
      provisionPublicIp: true
      region: us-west1
      restrictedSrcAddressApp: [0.0.0.0/0]
      restrictedSrcAddressMgmt: [0.0.0.0/0]
      uniqueString: name1234
      zone: us-west1-a
    type: quickstart.py
JeffGiroux commented 1 year ago

see https://github.com/F5Networks/f5-bigip-runtime-init/issues/46

JeffGiroux commented 1 year ago

Workaround

Since the BIG-IP VM successfully deployed as an instance, you can still fix this. Login via SSH to the BIG-IP instance. Make sure to SSH to NIC1 as that is the "management" network after nic-swap.

  1. SSH to BIG-IP NIC1 IP address
  2. go into bash mode
  3. remove /config/startup_finished file
  4. re-run f5-bigip-runtime-init
ssh admin@x.x.x.x -i ~/.ssh/id_rsa

admin@(demo-bigip1)(Standalone)(Active)(/Common)(tmos)# bash
[admin@demo-bigip1:Active:Standalone] ~ # rm -rf /config/startup_finished
[admin@demo-bigip1:Active:Standalone] ~ # /usr/local/bin/f5-bigip-runtime-init --config-file /config/cloud/runtime-init-conf.yaml &

Runtime init will run again, and with luck, the installed extensions will not error.

Sample success logs after manual re-run...

 [admin@localhost:Active:Standalone] ~ # 2022-11-03T23:58:51.138Z [5528]: info: Configuration file: /config/cloud/runtime-init-conf.yaml
2022-11-03T23:58:51.164Z [5528]: info: Processing controls parameters
2022-11-03T23:58:51.168Z [5528]: info: Validating provided declaration
2022-11-03T23:58:51.282Z [5528]: info: Successfully validated declaration
2022-11-03T23:58:51.370Z [5528]: info: Resolving parameters
2022-11-03T23:58:52.508Z [5528]: info: Executing install operations.
2022-11-03T23:59:32.573Z [5528]: info: Executing service operations.
2022-11-03T23:59:32.591Z [5528]: info: Creating - do 1.33.0 ---snippet--- 

Broadcast message from systemd-journald@bigip01.local (Fri 2022-11-04 00:00:42 UTC):

logger[14024]: Re-starting named

2022 Nov  4 00:00:42 bigip01.local logger[14024]: Re-starting named
2022-11-04T00:02:36.030Z [5528]: info: Creating - as3 3.40.0 --- snippet ---
2022-11-04T00:03:08.952Z [5528]: info: Executing custom post_onboard_enabled commands
2022-11-04T00:03:08.991Z [5528]: info: Executing inline shell command: EXT_GW=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/0/gateway); tmsh create net route ext_gw_int network $EXT_GW/32 interface external
2022-11-04T00:03:09.722Z [5528]: info: Shell command: EXT_GW=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/0/gateway); tmsh create net route ext_gw_int network $EXT_GW/32 interface external execution completed; response: 
2022-11-04T00:03:09.723Z [5528]: info: Executing inline shell command: INT_GW=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/2/gateway); tmsh create net route int_gw_int network $INT_GW/32 interface internal
2022-11-04T00:03:10.519Z [5528]: info: Shell command: INT_GW=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/2/gateway); tmsh create net route int_gw_int network $INT_GW/32 interface internal execution completed; response: 
2022-11-04T00:03:10.520Z [5528]: info: Executing inline shell command: MGMT_SELF_IP=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/0/ip); MGMT_MASK=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/0/subnetmask); MGMT_NETWORK=$(ipcalc -n $MGMT_SELF_IP $MGMT_MASK | sed -n 's/^NETWORK=\(.*\)/\1/p'); MGMT_PREFIX=$(ipcalc -p $MGMT_SELF_IP $MGMT_MASK | sed -n 's/^PREFIX=\(.*\)/\1/p'); tmsh create sys management-route dhclient_route1 network $MGMT_SELF_IP/32 type interface; tmsh create sys management-route dhclient_route2 gateway $MGMT_SELF_IP network $MGMT_NETWORK/$MGMT_PREFIX
2022-11-04T00:03:12.178Z [5528]: info: Shell command: MGMT_SELF_IP=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/0/ip); MGMT_MASK=$(curl -sH 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/0/subnetmask); MGMT_NETWORK=$(ipcalc -n $MGMT_SELF_IP $MGMT_MASK | sed -n 's/^NETWORK=\(.*\)/\1/p'); MGMT_PREFIX=$(ipcalc -p $MGMT_SELF_IP $MGMT_MASK | sed -n 's/^PREFIX=\(.*\)/\1/p'); tmsh create sys management-route dhclient_route1 network $MGMT_SELF_IP/32 type interface; tmsh create sys management-route dhclient_route2 gateway $MGMT_SELF_IP network $MGMT_NETWORK/$MGMT_PREFIX execution completed; response: 
2022-11-04T00:03:12.178Z [5528]: info: Executing inline shell command: tmsh save sys config
2022-11-04T00:03:18.579Z [5528]: info: Shell command: tmsh save sys config execution completed; response: Saving running configuration...
  /config/bigip.conf
  /config/bigip_base.conf
  /config/bigip_script.conf
  /config/bigip_user.conf
  /config/partitions/Tenant_1/bigip.conf
Saving Ethernet map ...done
Saving PCI map ...
 - verifying checksum .../var/run/f5pcimap: OK
done
 - saving ...done

---snippet---
2022-11-04T00:03:19.524Z [5528]: info: Sending f5-teem report
2022-11-04T00:03:19.529Z [5528]: info: All operations finished successfully
2022-11-04T00:03:28.212Z [5528]: info: Successfully sent data to F5 Teem
shyawnkarim commented 1 year ago

This issue, internal ID ESECLDTPLT-3219, has already been completed and will be available with the next release.