volsync icon indicating copy to clipboard operation
volsync copied to clipboard

WIP detect ipv6 dest addr and pass with [] to rsync

Open tesshuflower opened this issue 3 years ago • 3 comments

Signed-off-by: Tesshu Flower [email protected]

Describe what this PR does Rsync if provided with an IPv6 address needs to use the address in the format [ipv6addr]. This is a URL format.

In the mover script, attempt to detect if the destination address is an ipv6 address and wrap with [] only if it does not already contain []. This hopefully avoids issues with urls that are already formatted correctly.

Is there anything that requires special attention?

  • Crude ipv6 check - checking that there are enough stanzas with : (or :: is found)
  • Also avoids wrapping with [] if the address already contains [] - potentially could happen with a url address that embeds an ipv6 address?

Related issues: https://github.com/backube/volsync/issues/402

tesshuflower avatar Aug 30 '22 19:08 tesshuflower

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tesshuflower

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Aug 30 '22 19:08 openshift-ci[bot]

Codecov Report

Merging #405 (26262aa) into main (066f018) will increase coverage by 0.1%. The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #405     +/-   ##
=======================================
+ Coverage   64.1%   64.2%   +0.1%     
=======================================
  Files         44      45      +1     
  Lines       5171    5236     +65     
=======================================
+ Hits        3317    3364     +47     
- Misses      1657    1671     +14     
- Partials     197     201      +4     
Impacted Files Coverage Δ
controllers/utils/affinity.go 85.5% <0.0%> (-1.8%) :arrow_down:
controllers/platform/properties.go 67.4% <0.0%> (ø)

codecov[bot] avatar Sep 07 '22 15:09 codecov[bot]

/cc @JohnStrunk

John, do you mind taking a look at this? I wasn't able to get an easily accessible ipv6 env so haven't re-tested, but have been using this patch in other non-ipv6 rsync tests.

tesshuflower avatar Sep 08 '22 14:09 tesshuflower

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Sep 08 '22 16:09 sonarqubecloud[bot]

/lgtm

JohnStrunk avatar Sep 08 '22 19:09 JohnStrunk

/cherrypick release-0.5

tesshuflower avatar Sep 16 '22 13:09 tesshuflower

@tesshuflower: new pull request created: #437

In response to this:

/cherrypick release-0.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.