CaaS3: Update hostname
Posted on Tue 18 December 2018 in Linux • 1 min read
linux-q0sf:~ # cat /var/lib/misc/infra-secrets/mariadb-root-password
eVSf9Ss/HFa4Rj68ymzhmVsHvhdV6i5aqUpXuboMGRdwo1SVnysDd/wg0De+9FJymdBsJLdmYsdU
linux-q0sf:~ # docker exec -ti d72182149834 bash
bash-4.3# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 18
Server version: 10.0.34-MariaDB SLE 12 SP1 package
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance\_schema |
| velum_production |
+--------------------+
4 rows in set (0.01 sec)
MariaDB [(none)]> use velum_production;
MariaDB [velum_production]> update minions set fqdn="caas2.loc.al" where minion_id = "c2136e77f62444b6a68b758a231f00eb";
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [velum_production]> select * from minions;
+----+----------------------------------+--------------+------+-----------+-------------------------+------------------+---------------------+---------------------+
| id | minion_id | fqdn | role | highstate | tx_update_reboot_needed | tx_update_failed | created_at | updated_at |
+----+----------------------------------+--------------+------+-----------+-------------------------+------------------+---------------------+---------------------+
| 1 | admin | admin | 2 | 3 | 0 | 0 | 2018-11-05 09:29:16 | 2018-11-05 09:29:16 |
| 2 | c2136e77f62444b6a68b758a231f00eb | caas2.loc.al | NULL | 0 | 0 | 0 | 2018-11-05 09:40:28 | 2018-11-05 09:40:28 |
| 3 | 82177752bc1f4613beae955d4080d994 | linux.loc.al | NULL | 0 | 0 | 0 | 2018-11-05 09:40:28 | 2018-11-05 09:40:28 |
+----+----------------------------------+--------------+------+-----------+-------------------------+------------------+---------------------+---------------------+
3 rows in set (0.00 sec)
MariaDB [velum_production]> update minions set fqdn="caas3.loc.al" where minion_id = "82177752bc1f4613beae955d4080d994";
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0