setup-cloudflare-warp icon indicating copy to clipboard operation
setup-cloudflare-warp copied to clipboard

Post Action runs for too long

Open RealDyllon opened this issue 10 months ago • 2 comments

The Post Run Boostport/setup-cloudflare-warp step runs for approximately 2 minutes on end.

The post-action step appears to be running /usr/bin/warp-cli --accept-tos settings repeatedly for approximately 2 minutes

Sample Step output
Post job cleanup.
/usr/bin/sudo rm /var/lib/cloudflare-warp/mdm.xml

/usr/bin/warp-cli --accept-tos settings
Merged configuration:
(derived)	Always On: true
(network policy)	Switch Locked: false
(network policy)	Mode: WarpWithDnsOverHttps
(local policy)	Disabled for Wifi: false
(local policy)	Disabled for Ethernet: false
(network policy)	Resolve via: ***
(default)	Onboarding: true
(network policy)	Exclude mode, with hosts/ips:
...
(network policy)	Fallback domains:
...
(local policy)	Daemon Teams Auth: true
(network policy)	Disable Auto Fallback: false
(network policy)	Captive Portal: 180
(network policy)	Support URL: [email protected]
(local policy)	Organization: org-name
(local policy)	Auth Client ID: ***
(network policy)	Allow Mode Switch: false
(network policy)	Allow Updates: true
(local policy)	Allowed to Leave Org: false
(network policy)	LAN Access Settings: Allowed until reconnect on a /24 subnet
(network policy)	Profile ID: default

/usr/bin/warp-cli --accept-tos settings
Merged configuration:
(derived)	Always On: true
(network policy)	Switch Locked: false
(network policy)	Mode: WarpWithDnsOverHttps
(local policy)	Disabled for Wifi: false
(local policy)	Disabled for Ethernet: false
(network policy)	Resolve via: ***
(default)	Onboarding: true
(network policy)	Exclude mode, with hosts/ips:
...
(network policy)	Fallback domains:
...
(local policy)	Daemon Teams Auth: true
(network policy)	Disable Auto Fallback: false
(network policy)	Captive Portal: 180
(network policy)	Support URL: [email protected]
(local policy)	Organization: org-name
(local policy)	Auth Client ID: ***
(network policy)	Allow Mode Switch: false
(network policy)	Allow Updates: true
(local policy)	Allowed to Leave Org: false
(network policy)	LAN Access Settings: Allowed until reconnect on a /24 subnet
(network policy)	Profile ID: default

... this continues for ~2 minutes ...

RealDyllon avatar Apr 08 '24 08:04 RealDyllon

Does it eventually finish? The reason it's takes time is because it needs to check if the runner is disconnected from WARP: https://github.com/Boostport/setup-cloudflare-warp/blob/main/lib/setup-cloudflare-warp.js#L179

F21 avatar Apr 08 '24 08:04 F21

Not sure if this is the right approach but it makes sense to me to run the disconnect command explicitly before removing the config file just to be sure. Here's a PR for it.

giriparus avatar Jun 20 '24 11:06 giriparus