Upgrading Mender Server from 2.0 to 2.1

Hi,

I’m having a few problems upgrading my mender server from 2.0 to 2.1. First the instructions say

“run the migrate-db script from migration directory.”

So I tried that and got:
/mender-server/migration$ ./migrate-db
./migrate-db: line 30: ./run: No such file or directory

So I tried running it from the production directory which contains the run script:

/mender-server/production$ …/migration/migrate-db
Stopping menderproduction_mender-device-auth_1 … done
Stopping menderproduction_mender-useradm_1 … done
Stopping menderproduction_mender-deployments_1 … done
Stopping menderproduction_mender-inventory_1 … done
menderproduction_mender-mongo_1 is up-to-date
2019-10-04T13:28:29.616+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-useradm’ invalid: stat /srv/db-dump/mender-mongo-useradm: no such file or directory
2019-10-04T13:28:29.696+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-inventory’ invalid: stat /srv/db-dump/mender-mongo-inventory: no such file or directory
2019-10-04T13:28:29.733+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-device-auth’ invalid: stat /srv/db-dump/mender-mongo-device-auth: no such file or directory
2019-10-04T13:28:29.755+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-deployments’ invalid: stat /srv/db-dump/mender-mongo-deployments: no such file or directory

And I get some failures.

Should I be worried about these?

Cheers,
Martin.

I pushed on and tried the next step the git merge
rufilla@server5:~/projects/voestalpine/mender-server/production$ git merge 2.1.0
Removing update
Removing up
Removing stop
Removing reset
Auto-merging other-components.yml
CONFLICT (content): Merge conflict in other-components.yml
Auto-merging extra/release_tool.py
CONFLICT (content): Merge conflict in extra/release_tool.py
Auto-merging docker-compose.yml
CONFLICT (content): Merge conflict in docker-compose.yml
Removing docker-compose.mt.yml
Auto-merging docker-compose.enterprise.yml
CONFLICT (content): Merge conflict in docker-compose.enterprise.yml
Auto-merging docker-compose.docker-client.yml
CONFLICT (content): Merge conflict in docker-compose.docker-client.yml
Auto-merging docker-compose.client.yml
CONFLICT (content): Merge conflict in docker-compose.client.yml
Automatic merge failed; fix conflicts and then commit the result.

Have I done something wrong? I thought this would update to the 2.1.0 tag?

Cheers,
Martin.

Hi @martin it seems you have some local changes to those files. I’m not sure why else “git merge” would be detecting a conflict. Have you viewed the mentioned files to see what areas are flagged as conflicts?

Hi Drew,

The local changes are the ones made that are described in the production server setup instructions. As far as I know I have touched any of the files listed.

Here are some of the conflicts. Let me know if you want all of them.

docker-compose.client.yml:

version: '2'

services:

    #

    # mender-client

    #

    mender-client:

<<<<<<< HEAD

        image: mendersoftware/mender-client-qemu:2.0.1

=======

        image: mendersoftware/mender-client-qemu:2.1.0

>>>>>>> 2.1.0

        networks:

            - mender

        stdin_open: true

        tty: true

        privileged: true

docker-compose.docker-client.yml:

version: '2'

services:

    mender-client:

        # Needs to be built in mender client's test directory.

<<<<<<< HEAD

        image: mendersoftware/mender-client-docker:2.0.1

=======

        image: mendersoftware/mender-client-docker:2.1.0

>>>>>>> 2.1.0

        networks:

            - mender

docker-compose.enterprise.yml:

<<<<<<< HEAD:docker-compose.tenant.yml

    mender-mongo:

        networks:

            mender:

                aliases:

                    - mongo-tenantadm

                    - mongo-deployments

                    - mongo-device-auth

                    - mongo-inventory

                    - mongo-useradm

    mender-conductor:

        image: mendersoftware/mender-conductor-enterprise:1.3.1

=======

        environment:

            TENANTADM_CONDUCTOR_ADDR: http://mender-conductor:8080

>>>>>>> 2.1.0:docker-compose.enterprise.yml

....

<<<<<<< HEAD:docker-compose.tenant.yml

        image: mendersoftware/email-sender:1.3.1

=======

        image: mendersoftware/email-sender:1.4.0

>>>>>>> 2.1.0:docker-compose.enterprise.yml

Cheers,
Martin

I am facing the same issue as @martin. I try to migrate from version 2.0 (installed as described in the doku) to 2.1 too.

First, I execute “dump-db” without any errors, then i execute “migrate-db” and get the same errors as @martin mention in his first post.

I also get the merge conflict, but I haven’t changed the corresponding files either…
I just fixed it the hard way: “git merge 2.1.0 --strategy-option theirs”. But maybe this isn’ t the best way…

Given the conflicts posted above, I think using the “git merge 2.1.0 --strategy-option theirs” command is the best approach.