Ask Your Question

mr-han's profile - activity

2020-09-17 04:25:27 -0600 received badge  Notable Question (source)
2020-09-17 04:24:37 -0600 received badge  Notable Question (source)
2020-09-02 23:53:46 -0600 received badge  Popular Question (source)
2020-09-02 19:53:22 -0600 received badge  Popular Question (source)
2020-08-21 01:53:27 -0600 answered a question trove mysql backup failure

I have solved the problem ,Because of the crete_user function,Modify the following:

    def _create_admin_user(self, client, password):
        """
        Create a os_admin user with a random password
        with all privileges similar to the root user.
        """
        LOG.debug("Creating Trove admin user '%s'.", ADMIN_USER_NAME)
 #       host = "127.0.01"    
        host = "localhost"    
        try:
            cu = sql_query.CreateUser(ADMIN_USER_NAME, host=host,
                                      clear=password)
            t = text(str(cu))
            client.execute(t, **cu.keyArgs)
        except (exc.OperationalError, exc.InternalError) as err:
            # Ignore, user is already created, just reset the password
            # (user will already exist in a restore from backup)
            LOG.debug(err)
            uu = sql_query.SetPassword(ADMIN_USER_NAME, host=host,
                                       new_password=password)
            t = text(str(uu))
            client.execute(t)

        g = sql_query.Grant(permissions='ALL', user=ADMIN_USER_NAME,
                            host=host, grant_option=True)
        t = text(str(g))
        client.execute(t)
        LOG.debug("Trove admin user '%s' created.", ADMIN_USER_NAME)
2020-08-20 22:09:13 -0600 asked a question trove mysql backup failure

My environment:

backup_strategy = InnoBackupEx
OpenStack version : Stein

I can take a backup mysql when I use the website image (http://tarballs.openstack.org/trove/images/),

But I can't backup mysql based on Centos7 by manually .

log:

IMPORTANT: Please check that the backup run completes successfully. At the end of a successful backup run innobackupex prints "completed OK!".

200821 03:13:56  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=localhost;port=3306;mysql_socket=/var/run/mysqld/mysqld.sock' as 'os_admin'  (using password: YES).
Failed to connect to MySQL server: DBI connect(';mysql_read_default_group=xtrabackup;host=localhost;port=3306;mysql_socket=/var/run/mysqld/mysqld.sock','os_admin',...) failed: Access denied for user 'os_admin'@'localhost' (using password: YES) at - line 1314.
200821 03:13:56 Connecting to MySQL server host: localhost, user: os_admin, password: set, port: 3306, socket: /var/run/mysqld/mysqld.sock
Failed to connect to MySQL server: Access denied for user 'os_admin'@'localhost' (using password: YES).
 check_process /usr/lib/python2.7/site-packages/trove/guestagent/strategies/backup/mysql_impl.py:94
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.strategies.backup.mysql_impl [-] Innobackupex did not complete successfully.
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent [-] Error saving backup: a5ef8b6c-e662-43be-9c79-97ef90f3df95.: BackupError
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent Traceback (most recent call last):
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent   File "/usr/lib/python2.7/site-packages/trove/guestagent/backup/backupagent.py", line 113, in stream_backup_to_storage
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent     return meta
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent   File "/usr/lib/python2.7/site-packages/trove/guestagent/strategies/backup/base.py", line 96, in __exit__
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent     raise BackupError
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent BackupError
2020-08-21 03:13:56.202 3000 ERROR trove.guestagent.backup.backupagent
2020-08-21 03:13:56.248 3000 INFO trove.guestagent.backup.backupagent [-] Completed backup a5ef8b6c-e662-43be-9c79-97ef90f3df95.
2020-08-21 03:13:56.248 3000 DEBUG trove.conductor.api [-] Making async call to cast update_backup for instance: 772aa954-681b-4176-aec5-7c49459b5d7f update_backup /usr/lib/python2.7/site-packages/trove/conductor/api.py:85
2020-08-21 03:13:56.252 3000 DEBUG trove.guestagent.backup.backupagent [-] Updated state for a5ef8b6c-e662-43be-9c79-97ef90f3df95 to {'backup_id': u'a5ef8b6c-e662-43be-9c79-97ef90f3df95', 'success': True, 'checksum': '7b3e1344d56d3e8fd7ea0efb0fdfb436', 'backup_type': 'InnoBackupEx', 'note': 'Successfully saved data to Swift!', 'state': 'FAILED', 'location': u'http://10.18.140.130:8080/swift/v1/AUTH_9ced828a52e24a9387fc818eb470d28b/database_backups/a5ef8b6c-e662-43be-9c79-97ef90f3df95.xbstream.gz.enc', 'size': 0.1}. stream_backup_to_storage /usr/lib/python2.7/site-packages/trove/guestagent/backup/backupagent.py:127
2020-08-21 03:13:56.265 3000 DEBUG trove.conductor.api [-] Making async call to cast error notification notify_exc_info /usr/lib/python2.7/site-packages/trove/conductor/api.py:115
2020-08-21 03:13:56.268 3000 ERROR oslo_messaging.rpc.server [-] Exception during message handling: BackupError
2020-08-21 03:13:56.268 3000 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2020-08-21 03:13:56.268 3000 ERROR oslo_messaging.rpc.server   File ...
(more)
2020-08-20 21:13:46 -0600 answered a question trove create MySQL replica failure

I saw a patch from 4 years ago https://opendev.org/openstack/trove/commit/f5d1caea889f85196dfc1efe4892560f0b145191

But my version of OpenStack is Stenin,This patch appears to have merged

2020-08-20 01:51:33 -0600 commented question How to get mysql images for trove? Can anyone Please share me the link

http://tarballs.openstack.org/trove/images/ (http://tarballs.openstack.org/trove/i...)

2020-08-20 01:47:29 -0600 commented answer Qos policy doesn't work with floatingip

Thanks, I solved the problem according to your suggestion

2020-08-20 01:47:26 -0600 received badge  Scholar (source)
2020-08-20 01:45:41 -0600 edited question Octavia Could not connect to instance

11111111111111

2020-08-20 01:35:41 -0600 asked a question trove create MySQL replica failure

My environment: Deployed with Kolla,Stein version guest image ( trove-ussuri-mysql-ubuntu-xenial.qcow2 ) download in http://tarballs.openstack.org/trove/images/

When I use backup_strategy = InnoBackupEx, I can successfully create the replica. But when I use backup_strategy = MySQLDump, I failed to create a replica.

Here is the error message:

  | encrypted_rpc_messaging | True                                                                                                                                                    |
| fault                   | Error creating replication snapshot from instance cb27dba9-8c85-454a-b57d-326ce7885b07 for new replica 6f495d6c-623c-4173-9915-9f1dcf7599eb.            |
|                         | An error occurred communicating with the guest:                                                                                                         |
|                         |     lsn attribute missing, bad parent?                                                                                                                  |
|                         | Traceback (most recent c...                                                                                                                             |
| fault_date              | 2020-08-20T06:00:14                                                                                                                                     |
| fault_details           | Server type: taskmanager                                                                                                                                |
|                         | Traceback (most recent call last):                                                                                                                      |
|                         |   File "/usr/lib/python2.7/site-packages/trove/taskmanager/manager.py", line 417, in create_instance                                                    |
|                         |     locality)                                                                                                                                           |
|                         |   File "/usr/lib/python2.7/site-packages/trove/taskmanager/manager.py", line 382, in _create_instance                                                   |
|                         |     backup_id, volume_type, modules)                                                                                                                    |
|                         |   File "/usr/lib/python2.7/site-packages/trove/taskmanager/manager.py", line 345, in _create_replication_slave                                          |
|                         |     replica_number=replica_number)                                                                                                                      |
|                         |   File "/usr/lib/python2.7/site-packages/trove/taskmanager/models.py", line 658, in get_replication_master_snapshot                                     |
|                         |     create_fmt_content, err)                                                                                                                            |
|                         |   File "/usr/lib/python2.7/site-packages/trove/taskmanager/models.py", line 809, in _log_and_raise                                                      |
|                         |     raise TroveError(message=full_message)                                                                                                              |
|                         | TroveError:                                                                                                                                             |
|                         |     Error creating replication snapshot from instance cb27dba9-8c85-454a-b57d-326ce7885b07 for new replica 6f495d6c-623c-4173-9915-9f1dcf7599eb.        |
|                         | An error occurred communicating with the guest:                                                                                                         |
|                         |     lsn attribute missing, bad parent?                                                                                                                  |
|                         | Traceback (most recent call last):                                                                                                                      |
|                         |                                                                                                                                                         |
|                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming                                 |
|                         |     res = self.dispatcher.dispatch(message)                                                                                                             |
|                         |                                                                                                                                                         |
|                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/oslo_messaging/rpc/dispatcher.py", line 276, in dispatch                                      |
|                         |     return self._do_dispatch(endpoint, method, ctxt, args)                                                                                              |
|                         |                                                                                                                                                         |
|                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/oslo_messaging/rpc/dispatcher.py", line 196, in _do_dispatch                                  |
|                         |     result = func(ctxt, **new_args)                                                                                                                     |
|                         |                                                                                                                                                         |
    |                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/osprofiler/profiler.py", line 160, in wrapper                                                 |
    |                         |     result = f(*args, **kwargs)                                                                                                                         |
    |                         |                                                                                                                                                         |
    |                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/trove/guestagent/datastore/mysql_common/manager.py", line 365, in get_replication_snapshot    |
    |                         |     context, app, None, snapshot_info)                                                                                                                  |
    |                         |                                                                                                                                                         |

|                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/trove/guestagent/strategies/replication/mysql_base.py", line 107, in snapshot_for_replication |
|                         |     incremental_runner=self.repl_incr_backup_runner)                                                                                                    |
|                         |                                                                                                                                                         |
|                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/trove/guestagent/backup/backupagent.py", line 153, in execute_backup                          |
|                         |     parent_metadata, extra_opts)                                                                                                                        |
|                         |                                                                                                                                                         |

|                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/trove/guestagent/backup/backupagent.py", line 83, in stream_backup_to_storage                 |
|                         |     **parent_metadata) as bkup:                                                                                                                         |
|                         |                                                                                                                                                         |
|                         |   File "/opt/guest-agent-venv/lib/python3.5/site-packages/trove/guestagent/strategies/backup/mysql_impl.py", line 127, in __init__                      |
|                         |     raise AttributeError(_('lsn attribute missing, bad parent?'))                                                                                       |
|                         |                                                                                                                                                         |
|                         | AttributeError: lsn attribute missing, bad parent?
2020-04-26 03:34:02 -0600 commented answer VPNaas bandwidth is too low

phase2alg=aes_gcm-null;modp2048 mtu = 9000

2020-04-26 03:31:56 -0600 received badge  Famous Question (source)
2020-03-21 03:58:01 -0600 answered a question fwaas v2 does not support hybrid port at the moment

Have you solved the problem ?

2020-03-19 00:28:56 -0600 received badge  Famous Question (source)
2020-03-05 05:32:29 -0600 received badge  Popular Question (source)
2020-03-05 05:32:29 -0600 received badge  Notable Question (source)
2020-03-04 02:46:25 -0600 asked a question Qos policy doesn't work with floatingip

I applied the qos policy to VM port and it worked , but applied the qos policy to FIP port and it doesn't work

Is this normal ?

1. openstack port set   --qos-policy  qos-policy  FIP_PORT
2. neutron  floatingip-associate  FLOATINGIP_ID   VM_PORT
2020-03-04 02:35:47 -0600 received badge  Popular Question (source)
2020-02-26 19:21:59 -0600 received badge  Notable Question (source)
2020-01-14 20:22:59 -0600 commented answer FIP with port_security_enabled

My version is OpenStack Rocky with OVS

2020-01-14 19:35:12 -0600 commented answer FIP with port_security_enabled
  • create VM with security group allowed all policy
  • neutron security-group-create drop_policy ( default without ingress policy)
  • neutron floatingip-associate
  • neutron port-update FIP_PORT --security-group drop_policy --port_security_enabled True
2020-01-13 19:28:08 -0600 commented answer FIP with port_security_enabled

Even if I apply the drop policy in FIP port, the traffic can still pass, But VM port can't pass

2020-01-13 19:28:08 -0600 received badge  Commentator
2020-01-13 03:46:05 -0600 commented answer FIP with port_security_enabled

It is normal for security groups to be applied to virtual machines. Only bind security group to FIP port , but security group policy does not take effect

2020-01-13 01:20:00 -0600 asked a question FIP with port_security_enabled

I bind security group to FIP port , but security group policy does not take effect Is the security group only applicable to virtual machines port ?

 neutron  port-show 60b5486e-d6d7-49b4-a11d-0750d4b32866

| binding:vif_type      | unbound                                                                              |
| binding:vnic_type     | normal                                                                               |
| created_at            | 2020-01-13T06:44:59Z                                                                 |
| description           |                                                                                      |
| device_id             | c4a2bab2-8916-4b48-8b3e-1084657ddce7                                                 |
| device_owner          | network:floatingip                                                                   |
| extra_dhcp_opts       |                                                                                      |
| fixed_ips             | {"subnet_id": "bc3734ef-508d-4f7b-b352-bb114b816c97", "ip_address": "192.168.32.77"} |
| id                    | 60b5486e-d6d7-49b4-a11d-0750d4b32866                                                 |
| mac_address           | fa:16:3e:3d:26:af                                                                    |
| name                  |                                                                                      |
| network_id            | 9f2ca3c4-6339-4153-a97b-ac816005185b                                                 |
| port_security_enabled | True                                                                                 |
| project_id            |                                                                                      |
| qos_policy_id         |                                                                                      |
| revision_number       | 4                                                                                    |
| security_groups       | cd3647c1-9f27-400b-bff0-7a0a84c6902a                                                 |
| status                | N/A                                                                                  |
| tags                  |                                                                                      |
| tenant_id             |                                                                                      |
| updated_at            | 2020-01-13T06:50:51Z                                                                 |
2019-12-18 00:21:32 -0600 received badge  Notable Question (source)
2019-12-10 23:16:29 -0600 edited question VPNaas bandwidth is too low

This bandwidth is only about 800-900 Mbits/sec , Only 10% of the bandwidth between physical nodes. How can I improve my bandwidth when using a VPNaas ?

Environmental information:

file :  /etc/neutron/neutron_vpnaas.conf
service_provider = VPN:strongswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default

file: /etc/neutron/l3_agent.ini
vpn_device_driver = neutron_vpnaas.services.vpn.device_drivers.libreswan_ipsec.LibreSwanDriver

OpenStack Rocky ovs + vlan + Centos7
network-1      192.168.113.12
network-2      192.168.113.13
compute-1     192.168.113.10
compute-2     192.168.113.15
router-1         192.168.130.41           netns on  network-1  node
router-2         192.168.130.47           netns on  network-2  node
vm1               192.16.11.19              on compute-1
vm2               192.16.12.7                on compute-2

Between two physical network nodes:

 iperf -c 192.168.113.13 -t 600 -P 4     ### 
------------------------------------------------------------
Client connecting to 192.168.113.13, TCP port 5001
TCP window size:  459 KByte (default)
------------------------------------------------------------
[  4] local 192.168.113.12 port 8963 connected with 192.168.113.13 port 5001
[  5] local 192.168.113.12 port 8965 connected with 192.168.113.13 port 5001
[  3] local 192.168.113.12 port 8967 connected with 192.168.113.13 port 5001
[  6] local 192.168.113.12 port 8969 connected with 192.168.113.13 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-600.0 sec   171 GBytes  2.44 Gbits/sec
[  3]  0.0-600.0 sec   171 GBytes  2.44 Gbits/sec
[  5]  0.0-600.0 sec   160 GBytes  2.29 Gbits/sec
[  6]  0.0-600.0 sec   160 GBytes  2.29 Gbits/sec
[SUM]  0.0-600.0 sec   661 GBytes  9.47 Gbits/sec

Between two physical compute nodes:

 iperf -c 192.168.113.15 -t 600 -P 4
------------------------------------------------------------
Client connecting to 192.168.113.15, TCP port 5001
TCP window size:  289 KByte (default)
------------------------------------------------------------
[  4] local 192.168.113.10 port 9582 connected with 192.168.113.15 port 5001
[  3] local 192.168.113.10 port 9584 connected with 192.168.113.15 port 5001
[  6] local 192.168.113.10 port 9586 connected with 192.168.113.15 port 5001
[  7] local 192.168.113.10 port 9588 connected with 192.168.113.15 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-600.0 sec   142 GBytes  2.03 Gbits/sec 
[  6]  0.0-600.0 sec   155 GBytes  2.21 Gbits/sec
[  3]  0.0-600.0 sec   170 GBytes  2.43 Gbits/sec
[  7]  0.0-600.0 sec   195 GBytes  2.80 Gbits/sec
[SUM]  0.0-600.0 sec   661 GBytes  9.47 Gbits/sec

When I use Vpnaas plugin ( IPsec vpn ) connect two networks:

[root@vm-1 ~]# iperf -c 192.16.12.7 -t 60 -P 4
------------------------------------------------------------
Client connecting to 192.16.12.7, TCP port 5001
TCP window size:  170 KByte (default)
------------------------------------------------------------
[  6] local 192.16.11.19 port 50778 connected with 192.16.12.7 port 5001
[  4] local 192.16.11.19 port 50774 connected with 192.16.12.7 port 5001
[  3] local 192.16.11.19 port 50772 connected with ...
(more)
2019-12-10 03:27:57 -0600 answered a question VPNaas bandwidth is too low

By optimizing the encryption algorithm and MTU, the performance improved significantly

2019-12-04 03:00:41 -0600 commented question VPNaas bandwidth is too low

Benchmarking and Performance testing

https://libreswan.org/wiki/Benchmarking_and_Performance_testing