Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack.sh fails on Fedora27 - mysql access denied #3

Closed
noelmcloughlin opened this issue Aug 26, 2018 · 4 comments · Fixed by #6
Closed

stack.sh fails on Fedora27 - mysql access denied #3

noelmcloughlin opened this issue Aug 26, 2018 · 4 comments · Fixed by #6
Labels

Comments

@noelmcloughlin
Copy link
Member

following error from stack.sh

                  +?[38;5;242mfunctions-common:is_fedora:442           ?(B?[m '[' Fedora = Fedora ']'
                  +?[38;5;242mlib/databases/mysql:configure_database_mysql:81 ?(B?[m start_service mariadb
                  +?[38;5;242mfunctions-common:start_service:2166      ?(B?[m '[' -x /bin/systemctl ']'
                  +?[38;5;242mfunctions-common:start_service:2167      ?(B?[m sudo /bin/systemctl start mariadb
                  +?[38;5;242mlib/databases/mysql:configure_database_mysql:87 ?(B?[m sudo mysqladmin -u root password devstack
                  mysqladmin: connect to server at 'localhost' failed
                  error: 'Access denied for user 'root'@'localhost' (using password: NO)'
                  +?[38;5;242mlib/databases/mysql:configure_database_mysql:87 ?(B?[m true
                  +?[38;5;242mlib/databases/mysql:configure_database_mysql:90 ?(B?[m sudo mysql -uroot -pdevstack -h127.0.0.1 -e 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' identified by '\''devstack'\'';'
                  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
                  +?[38;5;242mlib/databases/mysql:configure_database_mysql:1 ?(B?[m exit_trap
                  +?[38;5;242mstack.sh:exit_trap:515                   ?(B?[m local r=1

service is running

Aug 26 15:36:52 iedx10 systemd[1]: Starting MariaDB 10.2 database server...
Aug 26 15:36:52 iedx10 mysql-prepare-db-dir[37718]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing i
Aug 26 15:36:52 iedx10 mysql-prepare-db-dir[37718]: If this is not the case, make sure the /var/lib/mysql is empty before running
Aug 26 15:36:52 iedx10 mysqld[37755]: 2018-08-26 15:36:52 140493603482880 [Note] /usr/libexec/mysqld (mysqld 10.2.16-MariaDB) sta
Aug 26 15:36:52 iedx10 mysqld[37755]: 2018-08-26 15:36:52 140493603482880 [Warning] Could not increase number of max_open_files t
Aug 26 15:36:52 iedx10 mysqld[37755]: 2018-08-26 15:36:52 140493603482880 [Warning] Changed limits: max_open_files: 1024  max_con
Aug 26 15:36:52 iedx10 systemd[1]: Started MariaDB 10.2 database server.

@noelmcloughlin
Copy link
Member Author

Might need to reinstall mysql with same password defined for devstack?

@noelmcloughlin noelmcloughlin changed the title stack.sh fails on Fedora27 stack.sh fails on Fedora27 - mysql access denied Aug 26, 2018
@noelmcloughlin
Copy link
Member Author

noelmcloughlin commented Aug 29, 2018

Solution:

  1. Pillar Data
devstack:
  local:
    username: stack
    password: devstack
    enabled_services: 'mysql,key'     #needs quotes
    ### used by devstack openrc
    os_password: devstack

mysql:
  server:
    root_password: 'devstack'

packages:
  pkgs:
    unwanted:
      - mariadb
      - mariadb-tokudb-engine
      - mariadb-config
      - mariadb-libs
      - mariadb-rocksdb-engine
      - mariadb-common
      - mariadb-cracklib-password-check
      - mariadb-gssapi-server
      - mariadb-devel
      - mariadb-server-utils
      - mariadb-server
      - mariadb-backup
      - mariadb-errmsg

States:

# cat /srv/salt/top.sls 
#format: YAML

base:
  '*':
    - packages
    - mysql
    - devstack.clean
    - devstack

Important Fix

# rm -fr /var/lib/mysql/

Devstack now installs correctly on Fedora 27

                  =========================
                  DevStack Component Timing
                   (times are in seconds)  
                  =========================
                  run_process            2
                  osc                   84
                  wait_for_service       2
                  yum_install           32
                  git_timed             15
                  dbsync                17
                  pip_install          117
                  -------------------------
                  Unaccounted time     113
                  =========================
                  Total runtime        382
                  
                  
                  
                  This is your host IP address: 127.0.0.1
                  This is your host IPv6 address: fe80::92fc:f96e:69d:4fd8
                  Keystone is serving at http://127.0.0.1/identity/
                  The default users are: admin and demo
                  The password: devstack
                  
                  Services are running under systemd unit files.
                  For more information see: 
                  https://docs.openstack.org/devstack/latest/systemd.html
                  
                  DevStack Version: rocky
                  Change: 6c3d7fa5f7516ea4eb483f28783263d5f7d93590 Merge "Updated from generate-devstack-plugins-list" 2018-08-28 02:42:29 +0000
                  OS Version: Fedora 27 TwentySeven

Summary for local
-------------
Succeeded: 32 (changed=15)
Failed:     0
-------------
Total states run:     32

@saltstack-formulas-travis

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants