Skip to content

Commit

Permalink
cli:
Browse files Browse the repository at this point in the history
- "repoint-slaves" commands accepts sibling key
conf/resolve:
- introduced SkipBinlogServerUnresolveCheck config (defaults "true")
- depending on the above, ignoring hsotname-unresolve on for binlog
servers

web:
- introduced snapping for dragged instances
  • Loading branch information
shlomi-noach committed Aug 6, 2015
1 parent 2e524d7 commit ec69bbb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Requires fpm: https://github.com/jordansissel/fpm
#

release_version="1.4.281"
release_version="1.4.283"
release_dir=/tmp/orchestrator-release
release_files_dir=$release_dir/orchestrator
release_files_cli_dir=$release_dir/orchestrator-cli
Expand Down
2 changes: 1 addition & 1 deletion go/app/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func Cli(command string, strict bool, instance string, sibling string, owner str
if instanceKey == nil {
log.Fatal("Cannot deduce instance:", instance)
}
repointedSlaves, err, errs := inst.RepointSlaves(instanceKey, pattern)
repointedSlaves, err, errs := inst.RepointSlavesTo(instanceKey, pattern, siblingKey)
if err != nil {
log.Fatale(err)
} else {
Expand Down
2 changes: 2 additions & 0 deletions go/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type Configuration struct {
ActiveNodeExpireSeconds uint // Maximum time to wait for active node to send keepalive before attempting to take over as active node.
HostnameResolveMethod string // Method by which to "normalize" hostname ("none"/"default"/"cname")
MySQLHostnameResolveMethod string // Method by which to "normalize" hostname via MySQL server. ("none"/"@@hostname"/"@@report_host"; default "@@hostname")
SkipBinlogServerUnresolveCheck bool // Skip the double-check that an unresolved hostname resolves back to same hostname for binlog servers
ExpiryHostnameResolvesMinutes int // Number of minutes after which to expire hostname-resolves
RejectHostnameResolvePattern string // Regexp pattern for resolved hostname that will not be accepted (not cached, not written to db). This is done to avoid storing wrong resolves due to network glitches.
ReasonableReplicationLagSeconds int // Above this value is considered a problem
Expand Down Expand Up @@ -130,6 +131,7 @@ func NewConfiguration() *Configuration {
ActiveNodeExpireSeconds: 60,
HostnameResolveMethod: "cname",
MySQLHostnameResolveMethod: "@@hostname",
SkipBinlogServerUnresolveCheck: true,
ExpiryHostnameResolvesMinutes: 60,
RejectHostnameResolvePattern: "",
ReasonableReplicationLagSeconds: 10,
Expand Down
4 changes: 3 additions & 1 deletion go/inst/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ func UnresolveHostname(instanceKey *InstanceKey) (InstanceKey, bool, error) {
if err != nil {
return *instanceKey, false, log.Errore(err)
}
if instance.Key.Hostname != instanceKey.Hostname {
if instance.IsBinlogServer() && config.Config.SkipBinlogServerUnresolveCheck {
// Do nothing. Everything is assumed to be fine.
} else if instance.Key.Hostname != instanceKey.Hostname {
// Resolve(Unresolve(hostname)) != hostname ==> Bad; reject
if *config.RuntimeCLIFlags.SkipUnresolveCheck {
return *instanceKey, false, nil
Expand Down
3 changes: 3 additions & 0 deletions resources/public/js/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ function generateInstanceDivs(nodesMap) {
addClasses: true,
opacity: 0.67,
cancel: "#cluster_container .popover.instance h3 a",
snap: "#cluster_container .popover.instance",
snapMode: "inner",
snapTolerance: 10,
start: function(event, ui) {
resetRefreshTimer();
$("#cluster_container .accept_drop").removeClass("accept_drop");
Expand Down

0 comments on commit ec69bbb

Please sign in to comment.