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

[patch] Bug fix on StreamGetObject API and DNS cache expiration / refactor net connection #986

Conversation

kpango
Copy link
Collaborator

@kpango kpango commented Feb 5, 2021

Signed-off-by: kpango kpango@vdaas.org

Description:

add TLS handshake controls & more accurate host pass joining
use custom net dialer connection for k8s reconciliation.

This PR contains two bug fixes.

  1. gateway-components passed the E2E test, but it turns out that there is a bug in the StreamGetObject handler, this bug has already been fixed in this PR, but I don't know why it passed E2E, so we need to research it later.
  2. as we provided a DNS cache expiration daemon, but it was working without being invoked (DNS cache never expired...) However, this is not a big problem, because if there is no connection at the moment of dialing into the cached DNS information, it will behave as if it is going to update the cached information again.

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.15.7
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.13.1

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

Signed-off-by: kpango <kpango@vdaas.org>
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Feb 5, 2021

[WARNING:INTCFG] Changes in interal/config may require you to change Helm charts. Please check.

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Feb 5, 2021

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

}

Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
unnecessary trailing newline (whitespace)

@codecov
Copy link

codecov bot commented Feb 5, 2021

Codecov Report

Merging #986 (91c1048) into master (2eb8668) will increase coverage by 0.02%.
The diff coverage is 30.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #986      +/-   ##
==========================================
+ Coverage   14.45%   14.47%   +0.02%     
==========================================
  Files         492      494       +2     
  Lines       27906    28300     +394     
==========================================
+ Hits         4033     4096      +63     
- Misses      23635    23957     +322     
- Partials      238      247       +9     
Impacted Files Coverage Δ
internal/config/discoverer.go 0.00% <0.00%> (ø)
internal/config/meta.go 0.00% <0.00%> (ø)
internal/config/tcp.go 14.63% <0.00%> (-0.76%) ⬇️
internal/db/nosql/cassandra/cassandra.go 95.83% <0.00%> (-1.63%) ⬇️
internal/errors/net.go 66.66% <0.00%> (-33.34%) ⬇️
internal/k8s/option.go 0.00% <0.00%> (ø)
internal/k8s/reconciler.go 0.00% <0.00%> (ø)
internal/net/grpc/client.go 0.00% <0.00%> (ø)
internal/net/grpc/option.go 0.00% <0.00%> (ø)
internal/net/grpc/pool/pool.go 0.00% <0.00%> (ø)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca55ac1...06aa294. Read the comment docs.

Signed-off-by: kpango <kpango@vdaas.org>
Signed-off-by: kpango <kpango@vdaas.org>
internal/net/tcp/dialer.go Show resolved Hide resolved
internal/net/tcp/option.go Show resolved Hide resolved
internal/net/tcp/dialer.go Outdated Show resolved Hide resolved
Signed-off-by: kpango <kpango@vdaas.org>
@kpango kpango force-pushed the refactor/internal-net/more-controllable-tcp-handshake-and-connection-handling branch from 27141e0 to 1c68e4e Compare February 5, 2021 21:12
internal/net/tcp/dialer.go Show resolved Hide resolved
internal/net/tcp/option.go Show resolved Hide resolved
internal/net/tcp/dialer.go Outdated Show resolved Hide resolved
internal/net/tcp/dialer.go Show resolved Hide resolved
internal/net/tcp/dialer.go Show resolved Hide resolved
internal/net/tcp/dialer.go Show resolved Hide resolved
internal/net/tcp/dialer.go Show resolved Hide resolved
internal/net/tcp/dialer_test.go Outdated Show resolved Hide resolved
Signed-off-by: kpango <kpango@vdaas.org>
Signed-off-by: kpango <kpango@vdaas.org>
pkg/gateway/filter/handler/grpc/handler.go Show resolved Hide resolved
pkg/gateway/filter/handler/grpc/handler.go Show resolved Hide resolved
pkg/gateway/filter/handler/grpc/handler.go Show resolved Hide resolved
pkg/gateway/filter/handler/grpc/handler.go Show resolved Hide resolved
pkg/gateway/filter/handler/grpc/handler.go Show resolved Hide resolved
internal/k8s/reconciler.go Outdated Show resolved Hide resolved
Signed-off-by: kpango <kpango@vdaas.org>
Signed-off-by: kpango <kpango@vdaas.org>
Signed-off-by: kpango <kpango@vdaas.org>
Signed-off-by: kpango <kpango@vdaas.org>
internal/net/tcp/dialer_test.go Show resolved Hide resolved
internal/net/tcp/dialer_test.go Show resolved Hide resolved
internal/net/tcp/dialer_test.go Show resolved Hide resolved
internal/net/tcp/dialer_test.go Show resolved Hide resolved
internal/net/tcp/dialer_test.go Show resolved Hide resolved
internal/tls/tls.go Outdated Show resolved Hide resolved
internal/tls/tls.go Outdated Show resolved Hide resolved
Signed-off-by: kpango <kpango@vdaas.org>
kpango and others added 3 commits February 9, 2021 18:40
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Signed-off-by: kpango <kpango@vdaas.org>
@kpango
Copy link
Collaborator Author

kpango commented Feb 9, 2021

/changelog

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Feb 9, 2021

[CHANGELOG] Please edit the following lines.

  • [patch] Bug fix on StreamGetObject API and DNS cache expiration / refactor net connection (#986)
  • Remove base docker image (#995)
  • Use namespaced names for priorityclasses of new gateways (#992)
  • Add E2E Chaos tests running on GitHub Actions (#899)
  • Add zap logger to chart schema (#985)
  • add test for internal/errors/runtime (#984)
  • add test for internal/errors/tensorflow (#982)
  • add test for internal/errors/unit (#979)
  • update chatops permission (#990)
  • 🤖 Automatically update k8s manifests (#981)

@kpango kpango merged commit 30b724d into master Feb 9, 2021
@kpango kpango deleted the refactor/internal-net/more-controllable-tcp-handshake-and-connection-handling branch February 9, 2021 10:29
@vdaas-ci vdaas-ci mentioned this pull request Feb 9, 2021
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants