[MB-7289] [windows] Upgrade fails on cluster from 181 to 2.0 ( node referenced using hostnames) even after changing "ip" file Created: 29/Nov/12  Updated: 10/Apr/13  Resolved: 10/Dec/12

Status: Closed
Project: Couchbase Server
Component/s: installer, tools
Affects Version/s: 2.0
Fix Version/s: 2.0
Security Level: Public

Type: Bug Priority: Blocker
Reporter: Deepkaran Salooja Assignee: Farshid Ghods (Inactive)
Resolution: Fixed Votes: 0
Labels: 2.0-release-notes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: build 1967 on windows 64bit


 Description   

The upgrade from 181 to 2.0 doesn't work as expected on windows64 even after changing the C:\Program Files\Couchbase\Server\var\lib\couchbase\ip file. Tested with build 1967 with following steps:

1. Install 1.8.1. Create default bucket.
2. Change the hostname as per below steps:
http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractice-cloud-ip.html
3. Verify the hostname has been changed in the Servers section on UI.
4. Edit the C:\Program Files\Couchbase\Server\var\lib\couchbase\ip file to reflect the latest hostname.
5. Upgrade to build 1967.
6. Existing buckets prior to upgrade are not available and Servers tab shows the IP address again. The hostname change is lost.

 Comments   
Comment by Farshid Ghods (Inactive) [ 29/Nov/12 ]
using windows with host names is not a supported solution. deferring this to 2.1 to make this work by then!
Comment by Ketaki Gangal [ 29/Nov/12 ]
This should be supported?
Comment by Bin Cui [ 29/Nov/12 ]
After upgrade to build 1967, you should follow the step 2 again to change to hostnaem to ip address. We don't keep the hostname during upgrade. But we should keep the date upgraded. Can you try again?
Comment by Steve Yen [ 29/Nov/12 ]
Ketaki also pointed out to me that the instructions to upgrade ip->hostname do also cover both linux and windows.
Comment by Ketaki Gangal [ 29/Nov/12 ]
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-bestpractice-cloud-ip.html * updated the document link pointed above.
Comment by Deepkaran Salooja [ 30/Nov/12 ]
Tried again and followed step 2 again after the upgrade.

Now the hostname is shown correctly. But the bucket(and the data) is lost after upgrade.
After upgrade, setup screen is shown and old bucket/data is lost.
Comment by Bin Cui [ 30/Nov/12 ]
http://review.couchbase.org/#/c/22964/

Before upgrade:
Make sure ip file that contains hostname exists under <installroot>\var\lib\couchbase. Without it, upgrade will fail if node referenced with hostname !!!

After upgrade:
1. net stop couchbaseserver
2. copy <installroot>\var\lib\couchbase\config.dat <installroot>\var\lib\couchbase\config\config.dat
3. following the http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractice-cloud-ip.html to modify the node reference back to hostname
4. net start couchbaseserver

The above second step is newly added. We need to modify document to reflect the change. Again, this step is essential. Without it, you won't see the upgraded data and original bucket settings!
Comment by Bin Cui [ 30/Nov/12 ]
My test image exists under 10.3.2.23\c:\tmp\couchbase-server.setup.exe.
Comment by Ketaki Gangal [ 30/Nov/12 ]
Verified this on a 1 node 181 to 2.0 upgrade. It works, all data recovered from 181
Comment by Steve Yen [ 30/Nov/12 ]
The change for review is based on a commit that's been -1'ed, so the change will need to be updated to be instead based on the last, submitted couchbase commit.
Comment by Steve Yen [ 30/Nov/12 ]
up to blocker.
Comment by Bin Cui [ 01/Dec/12 ]
Rebased commit is submitted.
Comment by Deepkaran Salooja [ 03/Dec/12 ]
With build 1971(which has the fix), the hostname is shown and the original bucket is shown but the data is lost.

Below are the detailed steps I followed:

1. Install 1.8.1 on single node 64bit windows.
2. Change the hostname as per below steps:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-bestpractice-cloud-ip.html
3. Setup the cluster on UI and verify the hostname is being used in the Servers section on UI.
4. Create default bucket and load 500 items
5. Edit the ip file under <installroot>\var\lib\couchbase to have the hostname.
6. Upgrade to build 1971
7. net stop couchbaseserver
8. copy <installroot>\var\lib\couchbase\config.dat <installroot>\var\lib\couchbase\config\config.dat
9. modify the node reference back to hostname
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-bestpractice-cloud-ip.html
10. The UI shows the hostname and default bucket but there is no data in the bucket.
Comment by Bin Cui [ 03/Dec/12 ]
Tested build 1971 on setup 10.3.2.23. And it works with all data upgraded correctly.

Give me your ip address and and i will take a look. Also, please check directory <installdroot>\var\lib\couchbase\data. Do you see both default and default-data directories or just default-data directory? Make sure that ip file name will be just "ip" instead of "ip.txt". And can you show me the content of <installroot>\var\lib\couchbase\config\ip ?
Comment by Ketaki Gangal [ 03/Dec/12 ]
Hi Deep,

I tested w/ the steps outlined above. It works for
-Multi Node, Multi Bucket[ sasl and default]upgrade from 181 to 2.0
-single node, multi bucket [ sasl and default]

-Ketaki
Comment by Steve Yen [ 04/Dec/12 ]
per bug-scrub, this needs docs.
Comment by MC Brown (Inactive) [ 05/Dec/12 ]
Sorry, I'm not following the exact information required in the docs.

Is it that the ip file must match the configuration file *before* the upgrade takes place?

And this only applies to machines on which you have re-configured the IP address/hostname?
Comment by kzeller [ 05/Dec/12 ]
Added to RN with flag to get clarification from QA

For the Microsoft Windows platform,
        the upgrade from 1.8.1 to 2.0 does not work as expected on windows64.
        This is after changing the C:\Program Files\Couchbase\Server\var\lib\couchbase\ip file.
Comment by kzeller [ 05/Dec/12 ]
Added to

http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-bestpractice-cloud-ip.html

-Added to Release Note - cross reference to page and on page:
--

You must also edit the IP address configuration file, C:\Program Files\Couchbase \Server\var\lib\couchbase\ip. This file contains the identified IP address of the node once it is part of a cluster. Open the file, and add a single line containing the hostname, as configured in the previous step.
Comment by MC Brown (Inactive) [ 10/Dec/12 ]
Added information on the upgrade process in the following places:

http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-getting-started-upgrade-1-8-2-0.html#couchbase-getting-started-upgrade-1-8-2-0-windowsnotes
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-getting-started-upgrade-individual.html
Comment by MC Brown (Inactive) [ 10/Dec/12 ]
Documentation updated; handing back
Comment by Farshid Ghods (Inactive) [ 10/Dec/12 ]
documented
Comment by Deepkaran Salooja [ 10/Apr/13 ]
Verified. Per Ketaki's comment above.
Generated at Fri Oct 31 20:54:49 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.