Commit Graph

230 Commits

Author SHA1 Message Date
Kobi Samoray 5b2151d976 [NSXP,NSXT] orphaned LBs handling to nsxadmin
Add the options to detect and cleanup loadbalancer services which are
allocated in NSX but do not exist in Octavia.
The orphaned loadbalancer services prevents routers from being deleted
and therefore should be cleaned up prior to the router deletion.

Change-Id: Ic0ad5175214cff034bd76a16fc11dbea3ccd6b13
2021-10-21 10:09:06 +03:00
Yan Wang 8bb72b792c Add function to nsxadmin tool
Add these functions to auto-recover the nsxt tier1 router's binding info,
segment's metadata proxy config and dhcp profile edge cluster binding.

Change-Id: Id4c2d98c9666ba69da06a3375bf8284cd64f5ef4
2021-09-17 14:13:58 +08:00
Kobi Samoray 8352ce15b2 Octavia LB status admin util
When Octavia loadbalancer hangs in PENDING status, it becomes immutable
and cannot be recovered or deleted in any way.
The following admin util commmand updates the loadbalancer status to
ERROR so it can be deleted successfully, but sending an RPC message to
Octavia driver agent service.

Change-Id: I7ee1ba445ab4526ef8b2d271574319114a31d631
2021-05-03 11:36:28 +03:00
asarfaty 54b410ce48 MP2P migration: Some fixes
- Support NSX 3.2 which force all the ports of a network to be migrated togather
- Improve documentation
- Optionally skip enabling & disabling the migration coordinator service

Change-Id: I91900f040e22c336e7b8cc13bc8ed2f30452c80e
2021-03-21 13:10:15 +02:00
asarfaty 57e9a5540b V2T migration: Few validation fixing
- Detect internal networks for distributed routers as neutron networks
- No identical port fixed ips and address pairs allowed
- Only 2 dns nameservers are allowed per subnet
- Only 1 ipv6 subnet is allowed per network
- Improve logging: Add summery of all issues at the end, and add an option to write it to file

Change-Id: Id195f510c3915d80755ef656912efb21b51ff9ce
2021-03-04 13:30:55 +00:00
asarfaty 7b9fb7b6eb V2T migration: Set expected VIF id to compute ports
- Add an udmin utility to provide the mapping between compute ports
and vif-ids
- Add extension to the api replay mode to support setting it by the plugin
- Add the mapping file as a parameter to teh api replay and use it in the ports migration
- Remove post migration cleanup of ports

Change-Id: Icfd3ef9f8056ee9c602ac5e85345daa59309f602
2021-02-28 05:40:24 +00:00
asarfaty 17204bb098 V2T migration: distributed routers support
For the distributed router edges to be migrated, we need to created their
internal virtualwire network on the nsx-t as well.
For that we added an admin utility to list the necessary networks ans their vni,
and also updated the api-replay to create those networks.

Change-Id: I183e48a0ab8fcbe04810fec94e5cce584abcec15
2021-02-11 06:23:12 +00:00
asarfaty 3908e0e0c1 V2T validation: verify external subnets before migration
Check that the future external networks will not overlap with the tier0 uplinks

Change-Id: I4678f345a8b2e6d10d027d4b109e4604a37f685a
2021-02-10 08:36:30 +00:00
asarfaty 014c920bd4 V2T migration: Admin utility for enable/disable route redistribution
+ fixing constant typo in the admin utiities
+ fixing file handling issue in another v2t migration utility
+ fixing nsxv migration validate admin utility loading azs

Change-Id: I38cdc227b513b5ce6bd271dcc688a68334fa7906
2021-01-31 09:36:37 +00:00
asarfaty 461e5b7a43 V2T migration: Cleanup migrated dfw sections
Change-Id: I1d4ec0005ece29f1b1bba30f6960f624da30cf8a
2021-01-10 08:47:19 +00:00
asarfaty 3909366192 V2T migration: update network segment with vni
1. NSX|V admin utils: Add utility to list virtual wires
2. Add network vni field to the api_repaly extension
3. Let policy plugin set the vni value on the new segment
   while working in api-replay mode.

Change-Id: I872edd03cdd1a7ff1422cdc12ea2a1d75b5d0bcb
2021-01-07 06:40:10 +00:00
asarfaty f2444ee828 admin utility to disconnect edges in nsx-v
Will be used for V2T migration and rollback

Change-Id: I698ebb8353735b82308312dc76562eb426e57b3f
2020-12-18 07:15:57 +00:00
asarfaty eeac28dd80 Update master branch requirements
Bump neutron-lib, and osc-lib, and update some more requirements

Depends-on: Ie74ea517a403e6e2a7a4e0a245dd20e5281339e8
Change-Id: If34a9889fb0f137856f7c241788cf593e722d665
2020-12-09 21:32:11 +02:00
asarfaty 9cc7eae5da V2T migration: add pre-flight checks
Also remove extra address pairs in api_replay, since its only a warning
at the moment.

Change-Id: I31259738f69ce89c08adc0b24c4807a269460be8
2020-11-04 05:26:43 +00:00
Zuul cd16e6bf8c Merge "NSX|V: Add allow icmp6 multicast rules in edge firewall" 2020-07-23 06:32:51 +00:00
asarfaty c6d739b425 MP2P migration: enhance pre-migration checks
- Add a utility that can run the pre-checks separatly with:
nsxadmin -r nsx-migrate-t2p -o validate
- Add the nsx version check
- Verify no DHCP relay config
- Add unit tests to the migration utilities

Change-Id: I49b7402c38ade40df97a2aabc84a41fe29f23731
2020-07-19 10:15:57 +02:00
asarfaty 2defc5e7ac NSX|V: Add allow icmp6 multicast rules in edge firewall
Vsphere7 started to block this traffic so adding those rules to be
backwards compatible.
In addition, add admin utility to fix existing edge firewalls:
nsxadmin -r routers -o nsx-update-fw

Change-Id: Ia5c2832e377a1a17ef279191ee91b6fec8f65443
2020-07-11 04:14:37 +00:00
asarfaty b95e53a28d MP2P migration: improve logging
Add logfile option, use verbose to decide on logging level, and
add timestamp to logfile lines

Change-Id: I26a1d41b321044e7ba93a44f4ae6f083af3fe1ed
2020-06-29 11:56:59 +02:00
Adit Sarfaty 0bad4876dc T2P migration
This patch will allow moving neutron from using the nsx_v3 plugin to the nsx_p plugin.
This includes:
- admin utility to move all resources to the policy api:
  nsxadmin -r nsx-migrate-t2p -o import (--verbose)
  This utility will:
  -- Migrate all neutron used & created resource using the nsx migration api
  -- roll back all resources in case it failed
  -- post migration fix some of the policy resources to better match the expectation
     of the policy plugin
- admin utility that will cleanup left overs in the nsx_v3 db:
  nsxadmin -r nsx-migrate-t2p -o clean-all
  (can be used, but everything should work without calling it as well)
- Some minor changes to the policy plugin and drivers to allow it to handle migrated resource
  which are a bit different than those created with the policy plugin
  -- Delete DHCP server config once a migrated network is deleted
  -- Update LB L7 rules by their name suffix as their full display name is unknown

Change-Id: Ic17e0de1f4b2a2d95afa61ce33ffb0bc9e667b89
2020-06-23 09:03:23 +00:00
asarfaty b2a4862324 Fix docs sphinx requirements
Change-Id: Ib6009e622115ce007540f646178e171f25942099
2020-06-21 07:10:15 +02:00
asarfaty ed6bd1f4e9 Support custom config files in admin utilities
The admin utilities usually run with the default config files:
/etc/neutron/neutron.conf and /etc/neutron/plugins/vmware/nsx.ini

In order to run it with custom files you can use:
nsxadmin --config-file <neutron conf path> --config-file <nsx conf path>

Change-Id: I0c75f0a616d8016a840611edab1e3b3edb53c4ad
2020-06-18 13:37:50 +02:00
asarfaty 97c00a3ebb NSX|P: support multiple loadbalancers on a router
The loadbalancers using the router LB service will be marked on
a new tag on the NSX service.

Also adin an admin utility to update existing Lb services with the tag.

Change-Id: I6c38b45e4d683681a6915fd07ca296264c7d2495
2020-05-17 05:03:21 +00:00
asarfaty b970d8cc58 NSX|V3+P: cleanup common code
1. Move common code to a dedicated file
2. Stop using deprecated nsxlib apis
3. Remove irrelevant admin utilities

Change-Id: If6308ff47dcd8f51e17cf1e4d367a664681ad2de
2020-04-17 08:31:31 +00:00
asarfaty e68b87b176 NSX|P: Support policy DHCP
IPv4 support for Policy DHCP depending on the NSX version & on config.
Including devstack support for configuration & cleanup, and admin utilility
for migration from MP implementation to Policy one.

IPv6 support will follow in a future patch.

Change-Id: I01bfb5bd530c63ca8b635bbebcac47659187077e
2020-02-13 07:26:35 +00:00
asarfaty f60bdef4c9 NSX|P: Support segment & port admin state
Before NSX 3.0 the passthrough api was used to update the admin state.
With NSX 3.0 it can be updated using the policy api.

In addition, adding a new admin utility to update this field when
upgrading to NSX 3.0

Change-Id: I4020c07db0f595b1f46014a409a585188c88454e
2020-01-30 13:34:24 +00:00
Zuul 89bf73715b Merge "NSX|P: Fix devstack doc regarding MD Proxy config" 2020-01-06 16:13:11 +00:00
asarfaty 38dce1f068 NSX|P: Fix devstack doc regarding MD Proxy config
Change-Id: I120188ae944c18b3c022b707ab08fa034da03676
2020-01-06 15:10:01 +00:00
asarfaty f43739e98a Fix admin utils doc typos
Change-Id: I416ad03e447ceb330e90f1fd23c2bf58ef32c6dc
2020-01-06 15:31:13 +02:00
asarfaty 2df3791f28 NSX|P: Change order of NAT and Edge Firewall rules
Adding a new configuration to let the admin control if the edge firewall
rule will see the external addresses or internal ones, thus controlling
the order of implementation.

The new parameter firewall_match_internal_addr is True by default
so it is backwards compatible.

In addition, adding an admin utility to change this flag across all
existing nat rules.

Depends-on: Ia34e42a94c10bd3f12ebc658939ed826af53658c
Change-Id: I29e7acc03bf6b845d9a727cf075cbe2b0609af34
2019-12-10 06:29:59 +00:00
Adit Sarfaty de50f5bcf3 Pre-migration checks admin utility
Change-Id: I864ed65b68c632014b0e0414942d5a3aedca9d9c
2019-11-03 11:41:09 +02:00
Kobi Samoray 24e93461d0 Octavia driver: agent implementation
The driver is loaded, then terminated whenever a request is issued.
This behavior causes termination of the Octavia listener which is
responsible to the processing of the driver status updates and
statistics processing.
The following change implements an agent which will execute the
listener.

Change-Id: I566aaa65df4ba7455577a539aa9eebb6cc36a099
2019-09-28 14:01:00 +03:00
Zuul d2a0caeb60 Merge "NSXP: Trunk support" 2019-09-01 11:21:08 +00:00
Kobi Samoray ac93fa1b8d NSXP: Trunk support
Implementation of trunk driver for NSX-P

Change-Id: I3a86037520a8399b526a83188540c098f92f2d57
2019-08-11 16:57:27 +03:00
Adit Sarfaty 61f4d2727c Improve devstack doc
Change-Id: I3b806d37e69bfedf3e5b04cf7d6c37b03abd171b
2019-08-08 15:27:20 +00:00
Adit Sarfaty e2a5007884 NSX|V3+P: Admin utility to replace tier0
Replace an old tier0 (that might have been deleted) with a new one
Usage:
nsxadmin -r routers -o  update-tier0  --property old-tier0=<id>
                                      --property new-tier0=<id>

Change-Id: I83200508b827586cb0a404f43ac7ec23966d1675
2019-07-15 14:10:35 +03:00
Anna Khmelnitsky e7914520ba NSX|P: Add control over realization interval
Admin util can set realization and purge cycle interval on
policy appliance

Depends-on: Ie60e3a04980ae9d6a747f80497168e923f119824
Change-Id: I91be76d8cd2741ec36f5f80529cd295a3ee6addb
2019-07-15 06:04:53 +00:00
Adit Sarfaty 55b0cf16e8 NSX|P: VPNaaS driver
Change-Id: I3dae7c34527f7f65f37cf03e699007141865a090
2019-06-05 12:53:32 -07:00
Adit Sarfaty d753ec6945 Remove neutron-lbaas support & dependencies
Commit Ia4f4b335295c0e6add79fe0db5dd31b4327fdb54 removed all the
neutron-lbaas code from the master (Train) branch

Change-Id: I9035f6238773aad0591436c856550b7a5e01e687
2019-05-19 11:16:45 +03:00
Adit Sarfaty c479499f97 NSX|V3: Admin utility for reusing existing default section
To support the case of 2 instalations on teh same NSX backend,
The newer installation should reuse the default Os section & NS group.

Usage:
nsxadmin -r firewall-sections -o reuse

Change-Id: I0e187cea6ffa9ca3cdb6d215530426e611c8ae20
2019-05-13 07:52:47 +03:00
Boden R 4dfb2ecd50 cleanup openstack git refs and lower constraints
This patch:
- Updates git.openstack based URLs to use opendev.
- Cleans up the lower-constraints.txt file to only include what we
really need.

Change-Id: I3eecd97c313c33c820ca2be8f01f6848244cd52a
2019-04-30 07:16:41 -06:00
Adit Sarfaty 032b6b8e46 NSX|V adminUtils: detect and clean orphaned section rules
nsxadmin -r orphaned-rules -o list/nsx-clean will detect/delete orphaned
rules inside nsx sections that belong to neutron security groups.

Change-Id: I18ee55e70b8e3a97d7d5d2453b7994bc07d2c97c
2019-04-28 10:01:46 +00:00
Zuul e730b80738 Merge "Fix devstack documentation for Octavia" 2019-04-22 12:03:46 +00:00
Adit Sarfaty 7550c3098d Fix devstack doc FWaaS v2 sections
Change-Id: Ie8106b971e72d4d328a0c59414c0b55bf0541a58
2019-04-22 08:44:52 +03:00
Kobi Samoray 5a4ef0f69b Fix devstack documentation for Octavia
Devstack documentation suggests using noop driver for Octavia
networking.

Change-Id: I6531a4fd2a38013194fd083dca3bfb60505707ab
2019-04-21 15:59:07 +03:00
Adit Sarfaty edac5ce48c NSX|V3 adminUtils: detect and clean orphaned section rules
nsxadmin -r orphaned-firewall-sections -o nsx-list/clean will now
also detect/delete orphaned rules inside nsx sections that belong to
neutron security groups.

Change-Id: I7f733676e29f6a2b1177b4155e5b36aee3670438
2019-04-11 14:09:59 +03:00
Kobi Samoray 4f413ab2a9 Octavia: add o-da to required service list
Update documentation as Octavia now requires the driver agent to
operate.

Change-Id: I1a798fdf1478bf808bffc39e7b0e389f7ec7db15
2019-04-08 11:53:42 +03:00
Adit Sarfaty 8b48578f69 Retire oslosphinx
Change-Id: I83f84d0b9feccbe042d9119564744e955bc0b54b
2019-04-03 11:12:40 +03:00
Kobi Samoray e98a41d8d2 NSXP: LBaaS/Octavia support
Change-Id: I2bd7b01f921243d65f68ec328173e949607e7842
2019-04-01 14:41:02 +03:00
Zuul d951d25526 Merge "NSXv: admin util metadata breakage recovery" 2019-03-24 13:49:14 +00:00
Kobi Samoray 0e97278c8a NSXv: admin util metadata breakage recovery
Due to neutron bug, some metadata components in the various backend Edge
appliances are missing. The patch is supposed to address these
issues.

Admin util command can run per Edge, per AZ or for the whole cloud.

Cases handled by the utility:
- Existing metadata proxies' internal IP is different than the IPs which are
defined in the Edge's loadbalancer object.
This case can happen when the metadata proxies are recreated for some reason.

- Edge appliance is lacking the metadata network connectivity, and the
loadbalancer objects.
This case can happen while a router or a DHCP was created by the Neutron
parent process, which failed to initialize with metadata due to a bug.

- The Edge is missing the metadata firewall rules.
This case can happen while the first interface attachment to the router was
done in the Neutron parent process context due to the bug described above.

Command syntax:
Update AZ:
    nsxadmin -r metadata -o nsx-update --property az-name=az123

Update single Edge appliance:
    nsxadmin -r metadata -o nsx-update --property edge-id=edge-15

Update entire cloud:
    nsxadmin -r metadata -o nsx-update

Change-Id: I77de9e0a0c627e43d3b1c95573d151e0414a34a9
2019-03-15 12:06:50 +02:00