CloudStack
  1. CloudStack
  2. CLOUDSTACK-1017

Cloud-setup-databases operation failed in RHEL5

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: None
    • Component/s: Install and Setup
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None
    • Environment:
      RHEL : 5.3
      MYSQL : Server version: 5.0.95 Source distribution

      Description

      Steps to reproduce

      Install MS from network refactor code base

      run setup command > cloud-setup-databases cloud:password@localhost --deploy-as=root:password

      cloudsetup command failed with below error

      We apologize for below error:
      ***************************************************************
      Encountering an error when executing mysql script
      ----------------------------------------------------------------------
      table:
      /usr/share/cloud/setup/create-schema.sql

      Error:
      ERROR 1071 (42000) at line 1966: Specified key was too long; max key length is 1000 bytes

      Sql parameters:

      {'passwd': 'password', 'host': 'localhost', 'user': 'root', 'port': 3306}

      ----------------------------------------------------------------------

      ***************************************************************
      Please run:

      cloud-setup-database -h

      for full help
      [root@vl-sjc-cloud-qa02 CloudStack-non-OSS-8-rhel5]# cat /etc/redhat-release

        Activity

        Hide
        Prachi Damle added a comment -

        The key-length limit is put by the engine – MYISAM.

        MySql log was showing this error (/var/log/mysqld.log). On error, MySQL defaults to MYISAM and disables InnoDb

        130118 16:04:20 mysqld started
        /usr/libexec/mysqld: Can't create/write to file '/tmp/ibAK6cdy' (Errcode: 13)
        130118 16:04:20 InnoDB: Error: unable to create temporary file; errno: 13

        After fixing the /tmp folder write permissions (they were root only) , restarted mysql. InnoDB is now enabled.

        [root@vl-sjc-cloud-qa06 log]# chmod 777 /data -R
        [root@vl-sjc-cloud-qa06 log]# ls -lt /data/
        total 40
        drwxrwxrwx 46 root root 4096 Jan 18 16:04 tmp
        drwxrwxrwx 3 root root 4096 Jan 18 15:20 arch
        drwxrwxrwx 3 root root 4096 Nov 1 16:25 Repo
        drwxrwxrwx 2 root root 16384 Nov 1 16:10 lost+found

        [root@vl-sjc-cloud-qa06 log]# service mysqld restart

        130118 17:46:42 mysqld started
        130118 17:46:42 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
        InnoDB: Setting log file ./ib_logfile0 size to 5 MB
        InnoDB: Database physically writes the file full: wait...

        Show
        Prachi Damle added a comment - The key-length limit is put by the engine – MYISAM. MySql log was showing this error (/var/log/mysqld.log). On error, MySQL defaults to MYISAM and disables InnoDb 130118 16:04:20 mysqld started /usr/libexec/mysqld: Can't create/write to file '/tmp/ibAK6cdy' (Errcode: 13) 130118 16:04:20 InnoDB: Error: unable to create temporary file; errno: 13 After fixing the /tmp folder write permissions (they were root only) , restarted mysql. InnoDB is now enabled. [root@vl-sjc-cloud-qa06 log] # chmod 777 /data -R [root@vl-sjc-cloud-qa06 log] # ls -lt /data/ total 40 drwxrwxrwx 46 root root 4096 Jan 18 16:04 tmp drwxrwxrwx 3 root root 4096 Jan 18 15:20 arch drwxrwxrwx 3 root root 4096 Nov 1 16:25 Repo drwxrwxrwx 2 root root 16384 Nov 1 16:10 lost+found [root@vl-sjc-cloud-qa06 log] # service mysqld restart 130118 17:46:42 mysqld started 130118 17:46:42 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait...
        Hide
        Prachi Damle added a comment -

        root@vl-sjc-cloud-qa06 ~]# cloud-setup-databases cloud:password@localhost --deploy-as=root:password
        Mysql user name:cloud [ OK ]
        Mysql user password:password [ OK ]
        Mysql server ip:localhost [ OK ]
        Mysql server port:3306 [ OK ]
        Mysql root user name:root [ OK ]
        Mysql root user password:password [ OK ]
        Checking Cloud database files ... [ OK ]
        Checking local machine hostname ... [ OK ]
        Checking SELinux setup ... [ OK ]
        Detected local IP address as 10.223.195.112, will use as cluster management server node IP[ OK ]
        Preparing /etc/cloud/management/db.properties [ OK ]
        Applying /usr/share/cloud/setup/create-database.sql [ OK ]
        Applying /usr/share/cloud/setup/create-schema.sql [ OK ]
        Applying /usr/share/cloud/setup/create-database-premium.sql [ OK ]
        Applying /usr/share/cloud/setup/create-schema-premium.sql [ OK ]
        Applying /usr/share/cloud/setup/server-setup.sql [ OK ]
        Applying /usr/share/cloud/setup/templates.sql [ OK ]
        Applying /usr/share/cloud/setup/create-index-fk.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_db.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_schema.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_multipart.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_index.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_multipart_alter.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_bucketpolicy.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_policy_alter.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering.sql [ OK ]
        Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering_alter.sql [ OK ]
        Processing encryption ... [ OK ]
        Finalizing setup ... [ OK ]

        CloudStack has successfully initialized database, you can check your database configuration in /etc/cloud/management/db.properties

        Show
        Prachi Damle added a comment - root@vl-sjc-cloud-qa06 ~]# cloud-setup-databases cloud:password@localhost --deploy-as=root:password Mysql user name:cloud [ OK ] Mysql user password:password [ OK ] Mysql server ip:localhost [ OK ] Mysql server port:3306 [ OK ] Mysql root user name:root [ OK ] Mysql root user password:password [ OK ] Checking Cloud database files ... [ OK ] Checking local machine hostname ... [ OK ] Checking SELinux setup ... [ OK ] Detected local IP address as 10.223.195.112, will use as cluster management server node IP[ OK ] Preparing /etc/cloud/management/db.properties [ OK ] Applying /usr/share/cloud/setup/create-database.sql [ OK ] Applying /usr/share/cloud/setup/create-schema.sql [ OK ] Applying /usr/share/cloud/setup/create-database-premium.sql [ OK ] Applying /usr/share/cloud/setup/create-schema-premium.sql [ OK ] Applying /usr/share/cloud/setup/server-setup.sql [ OK ] Applying /usr/share/cloud/setup/templates.sql [ OK ] Applying /usr/share/cloud/setup/create-index-fk.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_db.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_schema.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_multipart.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_index.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_multipart_alter.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_bucketpolicy.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_policy_alter.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering.sql [ OK ] Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering_alter.sql [ OK ] Processing encryption ... [ OK ] Finalizing setup ... [ OK ] CloudStack has successfully initialized database, you can check your database configuration in /etc/cloud/management/db.properties
        Hide
        Rayees Namathponnan added a comment -

        Verified ,

        Show
        Rayees Namathponnan added a comment - Verified ,

          People

          • Assignee:
            Prachi Damle
            Reporter:
            Rayees Namathponnan
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development