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

Cloning Virtual Service between two AVI Clusters #2659

Open
DoktorByte opened this issue May 12, 2023 · 0 comments
Open

Cloning Virtual Service between two AVI Clusters #2659

DoktorByte opened this issue May 12, 2023 · 0 comments
Labels

Comments

@DoktorByte
Copy link

Describe the bug

When I try to clone a Virtual Service to an AVI cluster via clone_vs.py, the script always aborts with the message that the VRF context is different.
However, on both sides the NSX-T cloud is configured completely identically, including the name

Reproduction steps

  1. python3 clone_vs.py -debug -c -dc -2c nsxmanager -t -2t vs

Expected behavior

Virtual service is cloned 1:1 on new new AVI cluster

Additional context

`clone_vs.py version 2.0.2

DEBUG:main:Debugging enabled
Password for admin@:
Password for admin@:
Creating source API session to ...OK!

Creating destination API session to ...OK!

Detected API version 22.1.2. Reconnecting.

Creating source API session to (22.1.2)...OK!

Creating destination API session to (22.1.2)...OK!

Trying to clone VS [] to [] in cloud -vdp-nsxmanager...
DEBUG:main:Cloning Virtual Service "" to ""
DEBUG:main:Source Virtual Service is an SNI/EVH child VS
DEBUG:main:Cloning pool "pool/pool-b068130b-7f18-418f-9db0-a0c249f1c08f" to "-pool"
DEBUG:main:Running _processobject_pool
DEBUG:main:Cloning forced refs for -pool
DEBUG:main:Cloning refs for -pool
DEBUG:main:Referenced object not available in target (healthmonitor/healthmonitor-4213eef0-923d-4831-ac06-2de9f1ca7ab7)
DEBUG:main:Using identically-named object "System-HTTPS"
DEBUG:main:Referenced object not available in target (sslprofile/sslprofile-0777a829-4ee3-4cef-b3bd-4e417f402562)
DEBUG:main:Using identically-named object "System-Standard"
DEBUG:main:Referenced object not available in target (pkiprofile/pkiprofile-a7a4c2a8-ea55-473b-b499-c47da9f86ab2)
DEBUG:main:Using identically-named object "Let's Encrypt"
DEBUG:main:Referenced object not available in target (analyticsprofile/analyticsprofile-3eab3432-1574-444c-bfc6-a0971f321ade)
DEBUG:main:Using identically-named object "System-Analytics-Profile"
DEBUG:main:Creating pool "-pool"...
DEBUG:main:Created pool "https:///api/pool/pool-46f785c2-13f9-4dce-af2e-836f6d123e6b#-pool"
DEBUG:main:Cloning httppolicyset "httppolicyset/httppolicyset-0ed2ba49-9795-46a0-bb4d-8f6bb5671186" to "--vdp-nsxmanager-HTTP-Policy-Set"
DEBUG:main:Forced unique name "--vdp-nsxmanager-HTTP-Policy-Set-1"
DEBUG:main:Running _processobject_httppolicyset
DEBUG:main:Processing http_security_policy
DEBUG:main:Running _process_policy_rules
DEBUG:main:Checking rule "Block health subpage"...
DEBUG:main:Cloning forced refs for --vdp-nsxmanager-HTTP-Policy-Set-1
DEBUG:main:Cloning refs
DEBUG:main:Referenced object not available in target (ipaddrgroup/ipaddrgroup-b056a239-9f91-4e82-a3b5-5bce95c25f19)
DEBUG:main:Using identically-named object "Icinga Backend"
DEBUG:main:Referenced object not available in target (ipaddrgroup/ipaddrgroup-c953c8f3-3e04-4d18-8189-2948034ae995)
DEBUG:main:Using identically-named object "Icinga Frontend"
DEBUG:main:Cloning forced refs for --vdp-nsxmanager-HTTP-Policy-Set-1
DEBUG:main:Cloning refs
DEBUG:main:Creating httppolicyset "--vdp-nsxmanager-HTTP-Policy-Set-1"...
DEBUG:main:Created httppolicyset "https:///api/httppolicyset/httppolicyset-52d05d72-757f-4d66-a1a7-3bf16b39b5d4#--vdp-nsxmanager-HTTP-Policy-Set-1"
DEBUG:main:Cloning networksecuritypolicy "networksecuritypolicy/networksecuritypolicy-7d9ad9de-780f-4107-bf7f-da8e45a55443" to "vs---vdp-nsxmanager-ns"
DEBUG:main:Forced unique name "vs---vdp-nsxmanager-ns-1"
DEBUG:main:Running _processobject_networksecuritypolicy
DEBUG:main:Running _process_policy_rules
DEBUG:main:Creating networksecuritypolicy "vs---vdp-nsxmanager-ns-1"...
DEBUG:main:Created networksecuritypolicy "https:///api/networksecuritypolicy/networksecuritypolicy-68175291-3a80-40d6-813f-7cc432ef803e#vs---vdp-nsxmanager-ns-1"
DEBUG:main:Cloning forced refs for
DEBUG:main:Cloning refs for
DEBUG:main:Referenced object not available in target (applicationprofile/applicationprofile-c45c68b5-c665-4f57-950a-58f1dd76170d)
DEBUG:main:Using identically-named object "System-Secure-HTTP"
DEBUG:main:Referenced object not available in target (networkprofile/networkprofile-b7c526f9-5e5b-41b4-8513-fad0c521958b)
DEBUG:main:Using identically-named object "System-TCP-Proxy"
DEBUG:main:Referenced object not available in target (analyticsprofile/analyticsprofile-3eab3432-1574-444c-bfc6-a0971f321ade)
DEBUG:main:Using identically-named object "System-Analytics-Profile"
DEBUG:main:Referenced object not available in target (errorpageprofile/errorpageprofile-55c31cb0-cdd0-4f00-aa72-6e7292f4ca72)
DEBUG:main:Using identically-named object "Custom-Error-Page-Profile"
DEBUG:main:Referenced object not available in target (sslprofile/sslprofile-22021efe-a736-4858-b790-97c67619009d)
DEBUG:main:Using identically-named object "TLS1.3"
DEBUG:main:Referenced object not available in target (sslkeyandcertificate/sslkeyandcertificate-64d91898-cf02-4fe5-be63-39e7cee61f77)
DEBUG:main:Using identically-named object "*."
DEBUG:main:Referenced object not available in target (wafpolicy/wafpolicy-11ad1fb4-cd76-4963-b8f2-22ed5706b6e6)
DEBUG:main:Cloning wafpolicy "wafpolicy/wafpolicy-11ad1fb4-cd76-4963-b8f2-22ed5706b6e6" to ""
DEBUG:main:Running _process_wafpolicy
DEBUG:main:Cloning forced refs for
DEBUG:main:Cloning refs for
DEBUG:main:Referenced object not available in target (wafprofile/wafprofile-be3455f7-3064-44e5-9a48-45f20abd4bfc)
DEBUG:main:Using identically-named object "System-WAF-Profile"
DEBUG:main:Referenced object not available in target (wafcrs/wafcrs-6502c81b-4222-4e70-bd55-19cadef7b7b7)
DEBUG:main:Using identically-named object "CRS-2021-4"
DEBUG:main:Creating wafpolicy ""...
DEBUG:main:Created wafpolicy "https:///api/wafpolicy/wafpolicy-52a0107f-8107-4dd7-9640-92a381334936#"
DEBUG:main:Referenced object not available in target (stringgroup/stringgroup-9e470782-55bc-4238-a9de-68c1b122c108)
DEBUG:main:Using identically-named object "System-Rewritable-Content-Types"
DEBUG:main:Unable to clone Virtual Service "" as "" (400:{"error": "VRF Context for and pool -pool different"})
DEBUG:main:{'active_standby_se_tag': 'ACTIVE_STANDBY_SE_1', 'advertise_down_vs': False, 'allow_invalid_client_cert': False, 'analytics_policy': {'all_headers': True, 'client_insights': 'PASSIVE', 'full_client_logs': {'duration': 0, 'enabled': True, 'throttle': 10}, 'learning_log_policy': {'enabled': False}, 'metrics_realtime_update': {'duration': 0, 'enabled': True}, 'significant_log_throttle': 10, 'udf_log_throttle': 10}, 'analytics_profile_ref': 'https:///api/analyticsprofile/analyticsprofile-ef0fd444-d4a0-4832-bcdd-5b70152554d2', 'application_profile_ref': 'https:///api/applicationprofile/applicationprofile-c0d47a18-6ad9-4b3e-b9e4-a3512e84dcb3', 'bulk_sync_kvcache': False, 'close_client_conn_on_config_update': False, 'cloud_ref': 'https:///api/cloud/cloud-01d79d5b-6f39-40f0-b96a-6c001718fe94', 'content_rewrite': {'rewritable_content_ref': 'https:///api/stringgroup/stringgroup-80fef96a-cd5c-4a80-b18e-66a95ca04328', 'rsp_rewrite_rules': [{'enable': False}]}, 'delay_fairness': False, 'east_west_placement': False, 'enable_autogw': True, 'enabled': False, 'error_page_profile_ref': 'https:///api/errorpageprofile/errorpageprofile-bd2ccb15-9bd4-46c2-a2d8-3b20fb1f681d', 'flow_dist': 'LOAD_AWARE', 'flow_label_type': 'NO_LABEL', 'http_policies': [{'http_policy_set_ref': 'https:///api/httppolicyset/httppolicyset-52d05d72-757f-4d66-a1a7-3bf16b39b5d4#--vdp-nsxmanager-HTTP-Policy-Set-1', 'index': 11}], 'ign_pool_net_reach': False, 'limit_doser': False, 'marked_for_delete': False, 'max_cps_per_client': 0, 'name': '', 'network_profile_ref': 'https:///api/networkprofile/networkprofile-af5c415b-360c-4586-aa80-809c8f49a677', 'network_security_policy_ref': 'https:///api/networksecuritypolicy/networksecuritypolicy-68175291-3a80-40d6-813f-7cc432ef803e#vs---vdp-nsxmanager-ns-1', 'pool_ref': 'https:///api/pool/pool-46f785c2-13f9-4dce-af2e-836f6d123e6b#-pool', 'redis_db': 14, 'redis_port': 5021, 'remove_listening_port_on_vs_down': False, 'scaleout_ecmp': True, 'se_group_ref': 'https:///api/serviceenginegroup/serviceenginegroup-8a6d0faf-dbff-45e2-a9fb-927e0d848b79', 'self_se_election': False, 'sideband_profile': {'sideband_max_request_body_size': 1024}, 'ssl_key_and_certificate_refs': ['https:///api/sslkeyandcertificate/sslkeyandcertificate-6035edc2-00fd-4291-9885-53e0e66ca5bd'], 'ssl_profile_ref': 'https:///api/sslprofile/sslprofile-8fb3db7e-9a6d-43bf-a7a2-338178717cc4', 'ssl_sess_cache_avg_size': 1024, 'tenant_ref': 'https:///api/tenant/tenant-bfa88839-76f0-4334-a337-493b0d226f80', 'tls_ticket_key': [{'aes_key': 'EY8hedwCpIDNVcIpL7rO1g==', 'hmac_key': 'zEl2T5WlFXX+LGj1u+I3dg==', 'name': '6eada99c-84e1-4bd4-82da-ab0b47549cdc'}, {'aes_key': 'q4ZdS08Vyh0wMFyelFVEoA==', 'hmac_key': 'J/1j01mi4RU0oyqtijSJIA==', 'name': '8850174f-fa01-4534-ba3c-d8676a1b7aef'}, {'aes_key': '68nTDu05HqxE4fQgjPHREQ==', 'hmac_key': '0O7gfkewf0F12zw2NtXWFA==', 'name': '3e8f21b2-5247-4c86-b623-fbb496dc7045'}], 'traffic_enabled': True, 'type': 'VS_TYPE_VH_CHILD', 'use_bridge_ip_as_vip': False, 'use_vip_as_snat': False, 'version': 2625, 'vh_domain_name': [''], 'vh_parent_vs_ref': 'https:///api/virtualservice/virtualservice-478c26db-f755-4667-83b9-3278bb7c4f93', 'vh_type': 'VS_TYPE_VH_SNI', 'waf_policy_ref': 'https:///api/wafpolicy/wafpolicy-52a0107f-8107-4dd7-9640-92a381334936#', 'weight': 1}
DEBUG:main:Deleting created objects...
DEBUG:main:Trying to delete pool/pool-46f785c2-13f9-4dce-af2e-836f6d123e6b#-pool
DEBUG:main:Trying to delete httppolicyset/httppolicyset-52d05d72-757f-4d66-a1a7-3bf16b39b5d4#--vdp-nsxmanager-HTTP-Policy-Set-1
DEBUG:main:Trying to delete networksecuritypolicy/networksecuritypolicy-68175291-3a80-40d6-813f-7cc432ef803e#vs---vdp-nsxmanager-ns-1
DEBUG:main:Trying to delete wafpolicy/wafpolicy-52a0107f-8107-4dd7-9640-92a381334936#

Unable to clone Virtual Service "" as "" (400:{"error": "VRF Context for and pool -pool different"})
=> Unable to clone Virtual Service "" as ""`

@DoktorByte DoktorByte added the bug label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant