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

Apply config file on scaled pd server #627

Merged
merged 3 commits into from
Jul 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,14 @@ func (p *Playground) enableBinlog() bool {

func (p *Playground) addInstance(componentID string, cfg instance.Config) (ins instance.Instance, err error) {
if cfg.BinPath != "" {
cfg.BinPath,err = getAbsolutePath(cfg.BinPath)
cfg.BinPath, err = getAbsolutePath(cfg.BinPath)
if err != nil {
return nil, err
}
}

if cfg.ConfigPath != "" {
cfg.ConfigPath,err = getAbsolutePath(cfg.ConfigPath)
cfg.ConfigPath, err = getAbsolutePath(cfg.ConfigPath)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/embed/autogen_pkger.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func init() {
autogenFiles["/templates/scripts/run_grafana.sh.tpl"] = "IyEvYmluL2Jhc2gKc2V0IC1lCgojIFdBUk5JTkc6IFRoaXMgZmlsZSB3YXMgYXV0by1nZW5lcmF0ZWQuIERvIG5vdCBlZGl0IQojICAgICAgICAgIEFsbCB5b3VyIGVkaXQgbWlnaHQgYmUgb3ZlcndyaXR0ZW4hCkRFUExPWV9ESVI9e3suRGVwbG95RGlyfX0KY2QgIiR7REVQTE9ZX0RJUn0iIHx8IGV4aXQgMQoKbWtkaXIgLXAge3suRGVwbG95RGlyfX0vcGx1Z2lucwpta2RpciAtcCB7ey5EZXBsb3lEaXJ9fS9kYXNoYm9hcmRzCm1rZGlyIC1wIHt7LkRlcGxveURpcn19L3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gICAtLWNvbmZpZz1jb25mL3RpZGIudG9tbCBcCiAgICAtLWxvZy1maWxlPSJ7ey5Mb2dEaXJ9fS90aWRiLmxvZyIgMj4+ICJ7ey5Mb2dEaXJ9fS90aWRiX3N0ZGVyci5sb2ciCg=="
Expand Down
5 changes: 4 additions & 1 deletion pkg/cluster/spec/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"path/filepath"
"strings"

"github.com/pingcap/errors"
"github.com/pingcap/tiup/pkg/cluster/api"
"github.com/pingcap/tiup/pkg/cluster/executor"
"github.com/pingcap/tiup/pkg/cluster/template/scripts"
Expand Down Expand Up @@ -217,7 +218,9 @@ func (i *PDInstance) InitConfig(e executor.Executor, clusterName, clusterVersion

// ScaleConfig deploy temporary config on scaling
func (i *PDInstance) ScaleConfig(e executor.Executor, cluster *Specification, clusterName, clusterVersion, deployUser string, paths meta.DirPaths) error {
if err := i.instance.InitConfig(e, clusterName, clusterVersion, deployUser, paths); err != nil {
// We need pd.toml here, but we don't need to check it
if err := i.InitConfig(e, clusterName, clusterVersion, deployUser, paths); err != nil &&
errors.Cause(err) != ErrorCheckConfig {
return err
}

Expand Down
1 change: 1 addition & 0 deletions templates/scripts/run_pd_scale.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ exec bin/pd-server \
--advertise-peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \
--data-dir="{{.DataDir}}" \
--join="{{template "PDList" .Endpoints}}" \
--config=conf/pd.toml \
--log-file="{{.LogDir}}/pd.log" 2>> "{{.LogDir}}/pd_stderr.log"