Skip to content
Snippets Groups Projects
Unverified Commit 59b5c67b authored by František Řezníček's avatar František Řezníček Committed by GitHub
Browse files

Merge pull request #52 from CESNET/update_test-cloud-access

update test-cloud-access
parents fef5cc30 90d383c0
No related branches found
No related tags found
No related merge requests found
Pipeline #613246 failed
...@@ -123,31 +123,35 @@ hide: ...@@ -123,31 +123,35 @@ hide:
Run the following bash script from the machine, where you believe you got blocked (A), and also from another one located in another IP network segment (B, for instance VM in other cloud): Run the following bash script from the machine, where you believe you got blocked (A), and also from another one located in another IP network segment (B, for instance VM in other cloud):
```sh ```sh
# Test Cloud Accessibility for a linux or Windows WSDL 2 environments # Test Cloud Accessibility for a linux or Windows WSDL 2 environments
# BASH function requires following tools to be installed: # BASH function requires following tools to be installed:
# ip, host tracepath traceroute ping, curl, ncat, timeout, bash # ip, host tracepath traceroute ping, curl, ncat, timeout, bash
# Execution example: test_cloud_access 178.128.250.99 22 # To be executed as non-privileged user in a (BASH) shell
# Execution example: test_cloud_access 178.128.250.99 22
function test_cloud_access() {
local basion_vm_public_ip="$1" # test_cloud_access <cloud-vm-ip> <cloud-vm-port> <cloud-api-host>
local basion_vm_public_port="${2:-22}" # tests the network connection to the cloud and produces traces
local cloud_identity_host=${3:-identity.cloud.muni.cz} function test_cloud_access() {
local timeout=60 local basion_vm_public_ip="$1"
set -x local basion_vm_public_port="${2:-22}"
cmds=("ip a" "ip -4 r l" "ip -6 r l") local cloud_identity_host=${3:-identity.brno.openstack.cloud.e-infra.cz} # identity.cloud.muni.cz
for i_cmd in "${cmds[@]}"; do local timeout=30
${i_cmd}; echo "ecode:$?";
done set -x
for i_cmd in host tracepath traceroute ping ; do cmds=("ip a" "ip -4 r l" "ip -6 r l" "curl http://ipinfo.io")
timeout --signal=2 ${timeout} ${i_cmd} "${cloud_identity_host}" for i_cmd in "${cmds[@]}"; do
echo "ecode:$?" ${i_cmd}; echo "ecode:$?";
done done
timeout --signal=2 ${timeout} curl -v "https://${cloud_identity_host}" for i_cmd in host tracepath traceroute "ping -c5" ; do
echo "ecode:$?" timeout --signal=2 ${timeout} ${i_cmd} "${cloud_identity_host}"
timeout --signal=2 ${timeout} ncat -z "${basion_vm_public_ip}" "${basion_vm_public_port}" echo "ecode:$?"
echo "ecode:$?" done
set +x timeout --signal=2 ${timeout} curl -v "https://${cloud_identity_host}"
} echo "ecode:$?"
timeout --signal=2 ${timeout} ncat -zv "${basion_vm_public_ip}" "${basion_vm_public_port}"
echo "ecode:$?"
set +x
}
``` ```
## How to report network issue and get unblocked ## How to report network issue and get unblocked
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment