Is it possible to configure sbt such that output from sbt dependencyTree is not trimmed?
Fragment of trimmed output:
[info] | | | | | | +-com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12...
[info] | | | | | | +-com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.14.0
[info] | | | | | | | +-com.fasterxml.jackson.core:jackson-core:2.14.0 (evicted by: ..
[info] | | | | | | | +-com.fasterxml.jackson.core:jackson-core:2.14.1
[info] | | | | | | | +-com.fasterxml.jackson.core:jackson-databind:2.14.0 (evicted ..
[info] | | | | | | | +-com.fasterxml.jackson.core:jackson-databind:2.14.1
[info] | | | | | | | +-com.fasterxml.jackson.core:jackson-annotations:2.14.1
[info] | | | | | | | +-com.fasterxml.jackson.core:jackson-core:2.14.1
Trimming is problematic for me, as the output of this command is picked up by snyk cli, which gets confused and reports false positives.
I am using sbt 1.8.0
dependencyTree tasks observe asciiGraphWidth option starting with sbt 1.6.0.
See sbt 1.6.0 release notes
Thus:
add asciiGraphWidth is build.sbt:
asciiGraphWidth := 180
alternatively, this can be passed in via command line:
sbt 'set asciiGraphWidth := 180' dependencyTree
I am trying to access some launched VMs without success. I followed this tutorial to create a private network. It is listed below:
+--------------------------------------+----------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+----------+--------------------------------------+
| 326a319c-e75d-48f1-ac36-aed342c45874 | private | f16b8b8c-482e-4cf5-a5d6-74e284b7e0f1 |
The security groups are listed below:
microstack.openstack security group list
+--------------------------------------+---------+------------------------+----------------------------------+------+
| ID | Name | Description | Project | Tags |
+--------------------------------------+---------+------------------------+----------------------------------+------+
| 04c5c579-91bf-4497-bd01-47c7fa69df81 | default | Default security group | 9c12393bf2e54547bef78aac510ba6c6 | [] |
| 3c69498c-c210-48c8-ba43-fbf60a0c224e | default | Default security group | 37f73779b3cd42dc96044ea0fd6d1e98 | [] |
| 5a20b02a-aac4-4c62-9ea2-24dfd8c59f67 | default | Default security group | | [] |
+--------------------------------------+---------+------------------------+----------------------------------+------+
I am using the following security group:
microstack.openstack security group show 3c69498c-c210-48c8-ba43-fbf60a0c224e
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| created_at | 2020-08-14T17:54:45Z |
| description | Default security group |
| id | 3c69498c-c210-48c8-ba43-fbf60a0c224e |
| location | Munch({'cloud': '', 'region_name': '', 'zone': None, 'project': Munch({'id': '37f73779b3cd42dc96044ea0fd6d1e98', 'name': 'admin', 'domain_id': None, 'domain_name': 'default'})}) |
| name | default |
| project_id | 37f73779b3cd42dc96044ea0fd6d1e98 |
| revision_number | 3 |
| rules | created_at='2020-08-14T17:54:45Z', direction='egress', ethertype='IPv6', id='1e5c2fed-7c7a-4dd4-9e11-c87d0de012ee', updated_at='2020-08-14T17:54:45Z' |
| | created_at='2020-08-14T17:54:45Z', direction='ingress', ethertype='IPv4', id='36394ec6-0f35-4b26-9788-61bf76a08088', remote_group_id='3c69498c-c210-48c8-ba43-fbf60a0c224e', updated_at='2020-08-14T17:54:45Z' |
| | created_at='2020-08-14T17:54:45Z', direction='ingress', ethertype='IPv6', id='48986d96-ec57-4f49-aee8-6e1c68e273b1', remote_group_id='3c69498c-c210-48c8-ba43-fbf60a0c224e', updated_at='2020-08-14T17:54:45Z' |
| | created_at='2020-08-14T17:56:16Z', direction='ingress', ethertype='IPv4', id='58816267-8df8-4a89-a9c5-31986a441365', port_range_max='22', port_range_min='22', protocol='tcp', remote_ip_prefix='0.0.0.0/0', updated_at='2020-08-14T17:56:16Z' |
| | created_at='2020-08-14T17:54:45Z', direction='egress', ethertype='IPv4', id='c75e9aa8-84f3-4d05-9d33-0da7892f7a07', updated_at='2020-08-14T17:54:45Z' |
| | created_at='2020-08-14T17:56:14Z', direction='ingress', ethertype='IPv4', id='d029b66c-219e-488d-93af-1f87a9d8b006', protocol='icmp', remote_ip_prefix='0.0.0.0/0', updated_at='2020-08-14T17:56:14Z' |
| tags | [] |
| updated_at | 2020-08-14T17:56:16Z |
The command I used to launch the VM:
microstack.openstack server create --flavor m1.medium --image ubuntu_1804 --nic net-id=326a319c-e75d-48f1-ac36-aed342c45874 --key-name microstack --security-group 3c69498c-c210-48c8-ba43-fbf60a0c224e server_micro
Below, we can see the VM was launched:
microstack.openstack server list
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+--------------+--------+-----------------------------------+-------------+-----------+
| 9e88311d-0907-4534-ba5d-ee80d2de06ee | server_micro | ACTIVE | private=10.0.0.127 | ubuntu_1804 | m1.medium |
microstack.openstack server show 9e88311d-0907-4534-ba5d-ee80d2de06ee
+-------------------------------------+----------------------------------------------------------+
| Field | Value |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | jabuti |
| OS-EXT-SRV-ATTR:hypervisor_hostname | jabuti |
| OS-EXT-SRV-ATTR:instance_name | instance-0000000a |
| OS-EXT-STS:power_state | Running |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2020-08-31T13:54:52.000000 |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | private=10.0.0.127 |
| config_drive | |
| created | 2020-08-31T13:54:45Z |
| flavor | m1.medium (3) |
| hostId | 61fe40d2c4303db62eef04a071c6d7ee01f0465ec467f911ac05e2c0 |
| id | 9e88311d-0907-4534-ba5d-ee80d2de06ee |
| image | ubuntu_1804 (a1d60e2d-72d7-47d8-8aea-e97e8ba2a09b) |
| key_name | microstack |
| name | server_micro |
| progress | 0 |
| project_id | 37f73779b3cd42dc96044ea0fd6d1e98 |
| properties | |
| security_groups | name='default' |
| status | ACTIVE |
| updated | 2020-08-31T13:54:53Z |
| user_id | ff66b68443994bfeb2101851e7ea026d |
| volumes_attached | |
+-------------------------------------+----------------------------------------------------------+
But I cannot access the launched instance:
ping 10.0.0.127
PING 10.0.0.127 (10.0.0.127) 56(84) bytes of data.
From 10.75.211.9: icmp_seq=2 Redirect Host(New nexthop: 10.75.211.13)
From 10.75.211.9: icmp_seq=3 Redirect Host(New nexthop: 10.75.211.13)
From 10.75.211.9: icmp_seq=4 Redirect Host(New nexthop: 10.75.211.13)
From 10.75.211.9: icmp_seq=5 Redirect Host(New nexthop: 10.75.211.13)
^C
--- 10.0.0.127 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4004ms
What am I missing? What should I do to ping/ssh the launched instance?
Once we create a VM with a private network, we need to associate a floating IP to it. Below, I list the steps needed to solve the problem.
Create a floating IP for your external network:
microstack.openstack floating ip create external
Create a router to communicate both networks (internal and external):
microstack.openstack router create router1
Add the external network to the router:
microstack.openstack router set router1 --external-gateway external
Add your private subnetwork to the router:
microstack.openstack router add subnet router1 f16b8b8c-482e-4cf5-a5d6-74e284b7e0f1
Associate the floating IP to your VM (suppose the created IP is 10.20.20.92):
microstack.openstack server add floating ip server_micro 10.20.20.92
Now you should be able to ping the VM and access it through ssh.
I am using WSO2 API Manager along with it's analytics server. I configured MySQL as it's database.
After a year of PROD use, I found that there are couple of tables from Analytics module, which consumes most of the DB space, around 95%.
Would like to know the significance of these tables. As well the challenges if we delete those tables.
Table names are
+--------------------------------+------------------------------------------------------+------------+
| Database | Table | Size in MB |
+--------------------------------+------------------------------------------------------+------------+
| wso2_analytics_event_store | anx___7lsekeca_ | 665.03 |
| wso2_analytics_event_store | anx___7lmnf2xa_ | 638.00 |
| wso2_analytics_event_store | anx___7lqcf_8o_ | 636.14 |
| wso2_analytics_event_store | anx___7lmk3tr0_ | 398.13 |
| analytics_processed_data_store | anx___7lpteea4_ | 282.75 |
| analytics_processed_data_store | anx___7lsn7ita_ | 249.97 |
| wso2_analytics_event_store | anx___7lsgqyce_ | 209.25 |
| wso2_analytics_event_store | anx___7lmno15m_ | 207.25 |
| wso2_analytics_event_store | anx___7lver1fy_ | 191.16 |
You can enable data purging for analytics tables. See below section taken from the docs.
Ref: https://docs.wso2.com/display/AM220/Purging+Analytics+Data
So...I'm facing a problem which I need the available amount of resources (and how are they being used) in the DCs (focusing on each project/server/network consume) of my Openstack (Stein) through python code (cause the other functionalities are in python and I don't like mixing languages if it have support for a functionality).
Are there any support for this on OpenstackSDK libraries? If yes, where to find the API documentation (or code examples of usage). If don't, why?
You can use existing Nova APIs to list down Compute capabilities and available resources.
nova hypervisor-stats
+----------------------+-------+
| Property | Value |
+----------------------+-------+
| count | 2 |
| current_workload | 0 |
| disk_available_least | 1378 |
| free_disk_gb | 1606 |
| free_ram_mb | 47003 |
| local_gb | 1606 |
| local_gb_used | 0 |
| memory_mb | 48027 |
| memory_mb_used | 1024 |
| running_vms | 0 |
| vcpus | 28 |
| vcpus_used | 0 |
+----------------------+-------+
You can automate it by wrapping it in shell or calling python-openstack lib.
When I create new image using glance does not matter if using cli or gui I am getting returned code 0 and image is created but its size is zero.
The behavior is slightly different as from GUI my browser crushes but stil image is created from cli I am getting return code 0.
Command:
openstack image create --file cirros-0.4.0-x86_64-disk.img --disk-format qcow2 --container-format bare --public --debug cirros-deb
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | d41d8cd98f00b204e9800998ecf8427e |
| container_format | bare |
| created_at | 2018-01-20T23:24:47Z |
| disk_format | qcow2 |
| file | /v2/images/c695bc30-731d-4a4f-ab0f-12eb972d8188/file |
| id | c695bc30-731d-4a4f-ab0f-12eb972d8188 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-deb |
| owner | a3460a3b0e8f4d0bbdd25bf790fe504c |
| protected | False |
| schema | /v2/schemas/image |
| size | 0 |
| status | active |
| tags | |
| updated_at | 2018-01-20T23:24:47Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+
clean_up CreateImage:
END return value: 0
I tried with different cirros image and with ubuntu cloud image always behavior is the same.
Under /var/lib/glance/images file is created with size 0:
-rw-r-----. 1 glance glance 0 Jan 21 00:24 c695bc30-731d-4a4f-ab0f-12eb972d8188
grep c695bc30-731d-4a4f-ab0f-12eb972d8188 glance/api.log
2018-01-21 00:24:47.915 1894 INFO eventlet.wsgi.server [req-7246cd30-47c4-41a5-b358-c8e5cc0f4e56 8bd3e4905ffb4f698e2476d9080a7d90 a3460a3b0e8f4d0bbdd25bf790fe504c - default default] 172.19.254.50 - - [21/Jan/2018 00:24:47] "PUT /v2/images/c695bc30-731d-4a4f-ab0f-12eb972d8188/file HTTP/1.1" 204 213 0.111323
2018-01-21 00:24:47.931 1894 INFO eventlet.wsgi.server [req-28e0cda2-c9f7-4543-b19a-d59eccffa47e 8bd3e4905ffb4f698e2476d9080a7d90 a3460a3b0e8f4d0bbdd25bf790fe504c - default default] 172.19.254.50 - - [21/Jan/2018 00:24:47] "GET /v2/images/c695bc30-731d-4a4f-ab0f-12eb972d8188 HTTP/1.1" 200 780 0.015399
Any idea what can be wrong?
Find location of python glance client.
find / -name http.py
vi /usr/lib/python2.7/site-packages/glanceclient/common/http.py
- data = self._chunk_body(data)
+ pass
Referenc:
https://bugs.launchpad.net/python-glanceclient/+bug/1666511
https://ask.openstack.org/en/question/101944/why-does-openstack-image-create-of-cirros-result-in-size-0/?answer=102303#post-id-102303