Skip to content

VTOrc Cleanup - Configs, APIs and old UI#11356

Merged
GuptaManan100 merged 50 commits intovitessio:mainfrom
planetscale:vtorc-config-cleanup
Sep 30, 2022
Merged

VTOrc Cleanup - Configs, APIs and old UI#11356
GuptaManan100 merged 50 commits intovitessio:mainfrom
planetscale:vtorc-config-cleanup

Conversation

@GuptaManan100
Copy link
Contributor

@GuptaManan100 GuptaManan100 commented Sep 26, 2022

Description

Since VTOrc was forked from Orchestrator, it inherited a lot of configurations that don't make sense for the Vitess use-case.
All of such configurations have been removed in this PR.

VTOrc ignores the configurations that it doesn't understand. So old configurations can be kept around on upgrading and won't cause any issues.
They will just be ignored.

For all the configurations that are kept, flags have been added for them and the flags are the desired way to pass these configurations going forward.
The config file will be deprecated and removed in upcoming releases. The following is a list of all the configurations that are kept and the associated flags added.

Configurations Kept Flags Introduced
SQLite3DataFile --sqlite-data-file
InstancePollSeconds --instance-poll-time
SnapshotTopologiesIntervalHours --snapshot-topology-interval
ReasonableReplicationLagSeconds --reasonable-replication-lag
AuditLogFile --audit-file-location
AuditToSyslog --audit-to-backend
AuditToBackendDB --audit-to-syslog
AuditPurgeDays --audit-purge-duration
RecoveryPeriodBlockSeconds --recovery-period-block-duration
PreventCrossDataCenterPrimaryFailover --prevent-cross-cell-failover
LockShardTimeoutSeconds --lock-shard-timeout
WaitReplicasTimeoutSeconds --wait-replicas-timeout
TopoInformationRefreshSeconds --topo-information-refresh-duration
RecoveryPollSeconds --recovery-poll-duration

The config file still takes precedence over the flags that can now be specified.

Apart from configurations, some flags from VTOrc have also been removed -

  • sibling
  • destination
  • discovery
  • skip-unresolve
  • skip-unresolve-check
  • noop
  • binlog
  • statement
  • grab-election
  • promotion-rule
  • skip-continuous-registration
  • enable-database-update
  • ignore-raft-setup
  • tag

The CLI code which wasn't being used has also been cleaned up. The old API and UI have also been removed in this PR. Along with that the web/vtorc directory is also removed. We have already added the new UI and ported over the APIs deemed necessary in #11370.

This PR also does the release notes documentation for these changes and also the changes in #11370.
Flags changes required for VTOrc are also done as part of this PR.

Related Issue(s)

Checklist

  • "Backport me!" label has been added if this change should be backported
  • Tests were added or are not required
  • Documentation was added or is not required Website docs are still pending and will be added after RC-1 of v15.

Deployment Notes

@vitess-bot
Copy link
Contributor

vitess-bot bot commented Sep 26, 2022

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • If this is a change that users need to know about, please apply the release notes (needs details) label so that merging is blocked unless the summary release notes document is included.

If a new flag is being introduced:

  • Is it really necessary to add this flag?
  • Flag names should be clear and intuitive (as far as possible)
  • Help text should be descriptive.
  • Flag names should use dashes (-) as word separators rather than underscores (_).

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow should be required, the maintainer team should be notified.

Bug fixes

  • There should be at least one unit or end-to-end test.
  • The Pull Request description should include a link to an issue that describes the bug.

Non-trivial changes

  • There should be some code comments as to why things are implemented the way they are.

New/Existing features

  • Should be documented, either by modifying the existing documentation or creating new documentation.
  • New features should have a link to a feature request issue or an RFC that documents the use cases, corner cases and test cases.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • vtctl command output order should be stable and awk-able.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from VTop, if used there.

…zation of database

Signed-off-by: Manan Gupta <manan@planetscale.com>
… execution on a replica

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
…port

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
…ages

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
…xport port for the old UI

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
…ompatibility

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
…endency on vtorc package

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
…o-server

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Comment on lines +269 to +271
#### Old UI Removal and Replacement

The old UI that VTOrc inherited from `Orchestrator` has been removed. A replacement UI, more consistent with the other Vitess binaries has been created.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release notes documentation is complete

Comment on lines -54 to -55
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/orchestrator /vt/web/orchestrator
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtorc /vt/web/vtorc
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since /web/vtorc and /web/orchestrator have been removed, we don't need to copy them in the lite images.

Comment on lines -153 to -157
- vtorc web ui:
- vtorc ui:
http://localhost:13000

- vtorc debug ui:
http://localhost:13200
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer have the old UI. Website docs have to be changed for this. Same change has been made for all the other examples as well.

Comment on lines +667 to +669
func Subtract(lhs, rhs string) (string, error) {
lhsSet, err := parseMysql56GTIDSet(lhs)
if err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was needed because we need to find the difference between the executed gtid set of the replica and primary to find the errant gtids. Earlier VTOrc used to run select gtid_subtract on the MySQL connection to the replica, but since we don't connect to the MySQL replica anymore, we have to use an internal function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are sufficient tests that are added to this function to verify that it works just as exected.

return nil
}

// TODO: Simplify the callers and delete this function
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do this later.

@GuptaManan100 GuptaManan100 merged commit e7f98f8 into vitessio:main Sep 30, 2022
@GuptaManan100 GuptaManan100 deleted the vtorc-config-cleanup branch September 30, 2022 16:41
dbussink added a commit to dbussink/vitess that referenced this pull request Feb 20, 2023
This was missed in vitessio#11356 where
this flag was deprecated and removed from most other places.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: VTOrc Vitess Orchestrator integration Type: Internal Cleanup

Projects

None yet

2 participants