Skip to content

Commit

Permalink
Merge pull request #56 from xiaods/dev
Browse files Browse the repository at this point in the history
tuning snapshort save case, handle etcd correctly
  • Loading branch information
xiaods authored Mar 19, 2021
2 parents 6283d59 + 05252f0 commit 014d517
Show file tree
Hide file tree
Showing 29 changed files with 14 additions and 3,429 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
jobs:

build:
name: Build
name: Build & Release
runs-on: ubuntu-latest
env:
DRONE_TAG: v1.19.8+k8e3
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ require (
github.com/pierrec/lz4 v2.5.2+incompatible
github.com/pkg/errors v0.9.1
github.com/rancher/dynamiclistener v0.2.3
github.com/rancher/kine v0.5.1
github.com/rancher/remotedialer v0.2.0
github.com/rancher/wrangler v0.6.1
github.com/rancher/wrangler-api v0.6.0
Expand Down
17 changes: 11 additions & 6 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,18 @@ func (c *Cluster) Start(ctx context.Context) (<-chan struct{}, error) {
return nil, err
}

// at this point, if etcd is in use, it's up, ready,
// and bootstrapping is complete so save the bootstrap
// data
// at this point, if etcd is in use, it's bootstrapping is complete
// so save the bootstrap data. We will need for etcd to be up. If
// the save call returns an error, we panic since subsequent etcd
// snapshots will be empty.
if c.managedDB != nil {
if err := c.save(ctx); err != nil {
return nil, err
}
go func() {
for range ready {
if err := c.save(ctx); err != nil {
panic(err)
}
}
}()
}

return ready, nil
Expand Down
178 changes: 0 additions & 178 deletions vendor/github.com/rancher/kine/LICENSE

This file was deleted.

83 changes: 0 additions & 83 deletions vendor/github.com/rancher/kine/pkg/broadcaster/broadcaster.go

This file was deleted.

Loading

0 comments on commit 014d517

Please sign in to comment.