{"action":"created","issue":{"url":"https://api.github.com/repos/github/gh-ost/issues/604","repository_url":"https://api.github.com/repos/github/gh-ost","labels_url":"https://api.github.com/repos/github/gh-ost/issues/604/labels{/name}","comments_url":"https://api.github.com/repos/github/gh-ost/issues/604/comments","events_url":"https://api.github.com/repos/github/gh-ost/issues/604/events","html_url":"https://github.com/github/gh-ost/issues/604","id":331703318,"node_id":"MDU6SXNzdWUzMzE3MDMzMTg=","number":604,"title":"-assume-master-host doesn't work with IPv6 literals","user":{"login":"Roguelazer","id":263424,"node_id":"MDQ6VXNlcjI2MzQyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/263424?v=4","gravatar_id":"","url":"https://api.github.com/users/Roguelazer","html_url":"https://github.com/Roguelazer","followers_url":"https://api.github.com/users/Roguelazer/followers","following_url":"https://api.github.com/users/Roguelazer/following{/other_user}","gists_url":"https://api.github.com/users/Roguelazer/gists{/gist_id}","starred_url":"https://api.github.com/users/Roguelazer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roguelazer/subscriptions","organizations_url":"https://api.github.com/users/Roguelazer/orgs","repos_url":"https://api.github.com/users/Roguelazer/repos","events_url":"https://api.github.com/users/Roguelazer/events{/privacy}","received_events_url":"https://api.github.com/users/Roguelazer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"shlomi-noach","id":2607934,"node_id":"MDQ6VXNlcjI2MDc5MzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2607934?v=4","gravatar_id":"","url":"https://api.github.com/users/shlomi-noach","html_url":"https://github.com/shlomi-noach","followers_url":"https://api.github.com/users/shlomi-noach/followers","following_url":"https://api.github.com/users/shlomi-noach/following{/other_user}","gists_url":"https://api.github.com/users/shlomi-noach/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomi-noach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomi-noach/subscriptions","organizations_url":"https://api.github.com/users/shlomi-noach/orgs","repos_url":"https://api.github.com/users/shlomi-noach/repos","events_url":"https://api.github.com/users/shlomi-noach/events{/privacy}","received_events_url":"https://api.github.com/users/shlomi-noach/received_events","type":"User","site_admin":true},"assignees":[{"login":"shlomi-noach","id":2607934,"node_id":"MDQ6VXNlcjI2MDc5MzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2607934?v=4","gravatar_id":"","url":"https://api.github.com/users/shlomi-noach","html_url":"https://github.com/shlomi-noach","followers_url":"https://api.github.com/users/shlomi-noach/followers","following_url":"https://api.github.com/users/shlomi-noach/following{/other_user}","gists_url":"https://api.github.com/users/shlomi-noach/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomi-noach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomi-noach/subscriptions","organizations_url":"https://api.github.com/users/shlomi-noach/orgs","repos_url":"https://api.github.com/users/shlomi-noach/repos","events_url":"https://api.github.com/users/shlomi-noach/events{/privacy}","received_events_url":"https://api.github.com/users/shlomi-noach/received_events","type":"User","site_admin":true}],"milestone":null,"comments":3,"created_at":"2018-06-12T18:31:25Z","updated_at":"2018-09-27T10:01:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I can't figure out how to make `--assume-master-host` respect IPv6 addresses. Passing `--assume-master-host \"some:ipv6:address\"` doesn't work; neither do `--assume-master-host \"[some:ipv6::address]` nor `--assume-master-host \"[some:ipv6:address]:3306`. I get a `FATAL Invalid port: ipv6:address]:3306`. I'm guessing something is splitting on `:` to get a host/port instead of properly parsing addresses.\r\n\r\nThis is with version 1.0.46"},"comment":{"url":"https://api.github.com/repos/github/gh-ost/issues/comments/425033140","html_url":"https://github.com/github/gh-ost/issues/604#issuecomment-425033140","issue_url":"https://api.github.com/repos/github/gh-ost/issues/604","id":425033140,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTAzMzE0MA==","user":{"login":"pznamensky","id":14976219,"node_id":"MDQ6VXNlcjE0OTc2MjE5","avatar_url":"https://avatars0.githubusercontent.com/u/14976219?v=4","gravatar_id":"","url":"https://api.github.com/users/pznamensky","html_url":"https://github.com/pznamensky","followers_url":"https://api.github.com/users/pznamensky/followers","following_url":"https://api.github.com/users/pznamensky/following{/other_user}","gists_url":"https://api.github.com/users/pznamensky/gists{/gist_id}","starred_url":"https://api.github.com/users/pznamensky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pznamensky/subscriptions","organizations_url":"https://api.github.com/users/pznamensky/orgs","repos_url":"https://api.github.com/users/pznamensky/repos","events_url":"https://api.github.com/users/pznamensky/events{/privacy}","received_events_url":"https://api.github.com/users/pznamensky/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T10:01:13Z","updated_at":"2018-09-27T10:01:13Z","author_association":"NONE","body":"Tried to test it, but found some strange things.\r\nThe good news is that `-assume-master-host` understands ipv6 addresses correctly.\r\nAt the same time `-host` still doesn't (all commands below are executing on the master with IPv6 address `2aaa::1`):\r\n\r\n```\r\n~ $ ./gh-ost -allow-on-master -host='2aaa::1' -password password -user ghost -verbose -database somedb -table sometable -alter 'ADD COLUMN tt varchar(255)'                             \r\n2018-09-27 12:25:36 INFO starting gh-ost 04c0be6137ef65e4136a798e64f7f48c7b168722\r\n2018-09-27 12:25:36 INFO Migrating `somedb`.`sometable`\r\n2018-09-27 12:25:36 INFO connection validated on 2aaa::1:3306\r\n2018-09-27 12:25:36 INFO User has ALL privileges\r\n2018-09-27 12:25:36 INFO binary logs validated on 2aaa::1:3306\r\n2018-09-27 12:25:36 INFO Restarting replication on 2aaa::1:3306 to make sure binlog settings apply to replication thread\r\n2018-09-27 12:25:36 INFO Inspector initiated on mysqlmaster:3306, version 10.2.16-MariaDB-log\r\n2018-09-27 12:25:36 INFO Table found. Engine=InnoDB\r\n2018-09-27 12:25:36 INFO Estimated number of rows via EXPLAIN: 713\r\n2018-09-27 12:25:36 INFO Recursively searching for replication master\r\n2018-09-27 12:25:36 INFO Master found to be mysqlmaster:3306\r\n2018-09-27 12:25:36 WARNING log_slave_updates not found on 2aaa::1:3306, but executing directly on master, so I'm proceeding\r\n2018-09-27 12:25:36 INFO connection validated on 2aaa::1:3306\r\n2018/09/27 12:25:36 binlogsyncer.go:79: [info] create BinlogSyncer with config {99999 mysql 2aaa::1 3306 ghost   false false <nil>}                                                                                                                     \r\n2018-09-27 12:25:36 INFO Connecting binlog streamer at mysql-bin.000001:23773403\r\n2018/09/27 12:25:36 binlogsyncer.go:246: [info] begin to sync binlog from position (mysql-bin.000001, 23773403)\r\n2018/09/27 12:25:36 binlogsyncer.go:139: [info] register slave for master server 2aaa::1:3306\r\n2018-09-27 12:25:36 INFO Tearing down inspector\r\n2018-09-27 12:25:36 INFO Tearing down streamer\r\n2018-09-27 12:25:36 FATAL dial tcp: address 2aaa::1:3306: too many colons in address\r\n```\r\n\r\n\r\nThe other strange thing is that `-assume-master-host` doesn't allow gh-ost to perform migration on the server with `binlog_format=ROW` and `log_slave_updates=OFF` in several cases.\r\nFor instance, this works fine: \r\n```\r\n~ $ ./gh-ost -allow-on-master --assume-master-host='127.0.0.1' -password password -user ghost -verbose -database somedb -table sometable -alter 'ADD COLUMN tt varchar(255)'   \r\n2018-09-27 12:13:08 INFO starting gh-ost 04c0be6137ef65e4136a798e64f7f48c7b168722\r\n2018-09-27 12:13:08 INFO Migrating `somedb`.`sometable`\r\n2018-09-27 12:13:08 INFO connection validated on 127.0.0.1:3306\r\n2018-09-27 12:13:08 INFO User has ALL privileges\r\n2018-09-27 12:13:08 INFO binary logs validated on 127.0.0.1:3306\r\n2018-09-27 12:13:08 INFO Restarting replication on 127.0.0.1:3306 to make sure binlog settings apply to replication thread\r\n2018-09-27 12:13:08 INFO Inspector initiated on mysqlmaster:3306, version 10.2.16-MariaDB-log\r\n2018-09-27 12:13:08 INFO Table found. Engine=InnoDB\r\n2018-09-27 12:13:08 INFO Estimated number of rows via EXPLAIN: 713\r\n2018-09-27 12:13:08 INFO Master forced to be 127.0.0.1:3306\r\n2018-09-27 12:13:08 WARNING log_slave_updates not found on 127.0.0.1:3306, but executing directly on master, so I'm proceeding\r\n2018-09-27 12:13:08 INFO connection validated on 127.0.0.1:3306\r\n2018/09/27 12:13:08 binlogsyncer.go:79: [info] create BinlogSyncer with config {99999 mysql 127.0.0.1 3306 ghost   false false <nil>}\r\n2018-09-27 12:13:08 INFO Connecting binlog streamer at mysql-bin.000001:23768541\r\n2018/09/27 12:13:08 binlogsyncer.go:246: [info] begin to sync binlog from position (mysql-bin.000001, 23768541)\r\n2018/09/27 12:13:08 binlogsyncer.go:139: [info] register slave for master server 127.0.0.1:3306\r\n2018/09/27 12:13:08 binlogsyncer.go:573: [info] rotate to (mysql-bin.000001, 23768541)\r\n2018-09-27 12:13:08 INFO rotate to next log from mysql-bin.000001:0 to mysql-bin.000001\r\n2018-09-27 12:13:08 INFO connection validated on 127.0.0.1:3306\r\n2018-09-27 12:13:08 INFO connection validated on 127.0.0.1:3306\r\n2018-09-27 12:13:08 INFO will use time_zone='SYSTEM' on applier\r\n2018-09-27 12:13:08 INFO Examining table structure on applier\r\n2018-09-27 12:13:08 INFO Applier initiated on mysqlmaster:3306, version 10.2.16-MariaDB-log\r\n2018-09-27 12:13:08 INFO Dropping table `somedb`.`_sometable_ghc`\r\n2018-09-27 12:13:08 INFO Table dropped\r\n2018-09-27 12:13:08 INFO Creating changelog table `somedb`.`_sometable_ghc`\r\n2018-09-27 12:13:08 INFO Changelog table created\r\n2018-09-27 12:13:08 INFO Creating ghost table `somedb`.`_sometable_gho`\r\n2018-09-27 12:13:08 INFO Ghost table created\r\n2018-09-27 12:13:08 INFO Altering ghost table `somedb`.`_sometable_gho`\r\n2018-09-27 12:13:08 INFO Ghost table altered\r\n2018-09-27 12:13:08 INFO Intercepted changelog state GhostTableMigrated\r\n2018-09-27 12:13:08 INFO Waiting for ghost table to be migrated. Current lag is 0s\r\n2018-09-27 12:13:08 INFO Handled changelog state GhostTableMigrated\r\n2018-09-27 12:13:08 INFO Chosen shared unique key is PRIMARY\r\n2018-09-27 12:13:08 INFO Shared columns are id,title,authors,cover,cover_height,cover_width,uuid,document_uuid,annotation,popularity,created_at,updated_at,synced,noteworthy\r\n2018-09-27 12:13:08 INFO Listening on unix socket file: /tmp/gh-ost.somedb.sometable.sock\r\n2018-09-27 12:13:08 INFO Migration min values: [7434424]\r\n2018-09-27 12:13:08 INFO Migration max values: [7686691]\r\n2018-09-27 12:13:08 INFO Waiting for first throttle metrics to be collected\r\n2018-09-27 12:13:08 INFO First throttle metrics collected\r\n# Migrating `somedb`.`sometable`; Ghost table is `somedb`.`_sometable_gho`\r\n2018-09-27 12:13:08 INFO Row copy complete\r\n# Migrating `somedb`.`sometable`; Ghost table is `somedb`.`_sometable_gho`\r\n# Migrating mysqlmaster:3306; inspecting mysqlmaster:3306; executing on mysqlmaster\r\n# Migrating mysqlmaster:3306; inspecting mysqlmaster:3306; executing on mysqlmaster\r\n# Migration started at Thu Sep 27 12:13:08 +0300 2018\r\n# chunk-size: 1000; max-lag-millis: 1500ms; dml-batch-size: 10; max-load: ; critical-load: ; nice-ratio: 0.000000\r\n# throttle-additional-flag-file: /tmp/gh-ost.throttle \r\n# Serving on unix socket: /tmp/gh-ost.somedb.sometable.sock\r\n# Migration started at Thu Sep 27 12:13:08 +0300 2018\r\n# chunk-size: 1000; max-lag-millis: 1500ms; dml-batch-size: 10; max-load: ; critical-load: ; nice-ratio: 0.000000\r\n# throttle-additional-flag-file: /tmp/gh-ost.throttle \r\n# Serving on unix socket: /tmp/gh-ost.somedb.sometable.sock\r\nCopy: 0/713 0.0%; Applied: 0; Backlog: 0/1000; Time: 0s(total), 0s(copy); streamer: mysql-bin.000001:23770902; State: migrating; ETA: N/A\r\nCopy: 0/0 100.0%; Applied: 0; Backlog: 0/1000; Time: 0s(total), 0s(copy); streamer: mysql-bin.000001:23770902; State: migrating; ETA: due\r\n2018-09-27 12:13:08 INFO New table structure follows\r\nCREATE TABLE `_sometable_gho` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `synced` tinyint(1) DEFAULT NULL,\r\n  `tt` varchar(255) DEFAULT NULL,\r\n  PRIMARY KEY (`id`),\r\n  KEY `index_sometable_on_uuid` (`uuid`),\r\n  KEY `index_sometable_on_synced` (`synced`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\r\n2018/09/27 12:13:08 binlogsyncer.go:107: [info] syncer is closing... \r\n2018/09/27 12:13:08 binlogstreamer.go:47: [error] close sync with err: sync is been closing...\r\n2018/09/27 12:13:08 binlogsyncer.go:122: [info] syncer is closed \r\n2018-09-27 12:13:08 INFO Closed streamer connection. err=<nil>\r\n2018-09-27 12:13:08 INFO Dropping table `somedb`.`_sometable_ghc`\r\n2018-09-27 12:13:08 INFO Table dropped\r\n2018-09-27 12:13:08 INFO Dropping table `somedb`.`_sometable_gho`\r\n2018-09-27 12:13:08 INFO Table dropped\r\n2018-09-27 12:13:08 INFO Done migrating `somedb`.`sometable`\r\n2018-09-27 12:13:08 INFO Removing socket file: /tmp/gh-ost.somedb.sometable.sock\r\n2018-09-27 12:13:08 INFO Tearing down inspector\r\n2018-09-27 12:13:08 INFO Tearing down applier\r\n2018-09-27 12:13:08 INFO Tearing down streamer\r\n2018-09-27 12:13:08 INFO Tearing down throttler\r\n# Done\r\n```\r\n\r\nBut after changing host to anything else except `127.0.0.1`:\r\n\r\n```\r\n~ $ ./gh-ost -allow-on-master --assume-master-host='::1' -password password -user ghost -verbose -database somedb -table sometable -alter 'ADD COLUMN tt varchar(255)'         \r\n2018-09-27 12:13:34 INFO starting gh-ost 04c0be6137ef65e4136a798e64f7f48c7b168722                                                     \r\n2018-09-27 12:13:34 INFO Migrating `somedb`.`sometable`                                                                                   \r\n2018-09-27 12:13:34 INFO connection validated on 127.0.0.1:3306                                                                       \r\n2018-09-27 12:13:34 INFO User has ALL privileges                                                                                      \r\n2018-09-27 12:13:34 INFO binary logs validated on 127.0.0.1:3306                                                                      \r\n2018-09-27 12:13:34 INFO Restarting replication on 127.0.0.1:3306 to make sure binlog settings apply to replication thread            \r\n2018-09-27 12:13:34 INFO Inspector initiated on mysqlmaster:3306, version 10.2.16-MariaDB-log\r\n2018-09-27 12:13:34 INFO Table found. Engine=InnoDB\r\n2018-09-27 12:13:34 INFO Estimated number of rows via EXPLAIN: 713\r\n2018-09-27 12:13:34 INFO Master forced to be ::1:3306\r\n2018-09-27 12:13:34 INFO Tearing down inspector\r\n2018-09-27 12:13:34 FATAL 127.0.0.1:3306 must have log_slave_updates enabled for executing migration\r\n```\r\nIf we're using `-host` instead of `-assume-master-host` it works fine.\r\n"}}
{"actor":{"display_login":"pznamensky"}}