antirez/redis — pull request #823 by bitterb (2012-12-12 14:04:38+00:00)
Title: Fix a bug in cluster.c that causes redis-trib.rb the invalid byte sequence error.

Hi, I am looking forward to Redis Cluster, and now trying some features.

I found that redis-trib.rb does not work on my environment (Ubuntu 12.10 + GCC 4.7.2) because of an error as follows.

```
% ruby redis-trib.rb create 127.0.0.1:6379 127.0.0.1:6380 127.0.0.1:6381
Creating cluster
Connecting to node 127.0.0.1:6379: OK
redis-trib.rb:95:in `split': invalid byte sequence in US-ASCII (ArgumentError)
from redis-trib.rb:95:in `load_info'
from redis-trib.rb:450:in `block in create_cluster_cmd'
from redis-trib.rb:446:in `each'
from redis-trib.rb:446:in `create_cluster_cmd'
from redis-trib.rb:492:in `

'
```

This is because of the uninitialized fields *ip* and *port* of the *clusterNode* for *myself*. We can also check this by the CLUSTER NODES command.

```
% src/redis-cli
redis 127.0.0.1:6379> CLUSTER NODES
04c162326adf4c1266b91ae19715e3b51fdb329f ?:-259964664 myself - 0 0 connected
^^^^^^^^^^^^
```

This commit adds the code to initialize the *ip* and *port* fields in the *createClusterNode* function. I hope that this pull request will help people try Redis Cluster.