threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

Minio chat flow reserve the wrong amount of 0-db namespaces #606

Closed zaibon closed 4 years ago

zaibon commented 4 years ago

This reservation https://explorer.grid.tf/explorer/reservations/9143 has been created using the minio chat flow. The minio process never managed to start cause the configuration for the storage policy is set to 4/2 While the amount of 0-db namespace reserved is 5. Which means minio will always crash at starts cause he doesn't have enough shards to operate.

I don't know how the capacity planning in done for minio. But usually you want to have more shards then the required amount by the storage policy. Reason is you want to still be able to write data even if one or more shards are unreachable.

A policy of 4/2 means It needs 6 valid writes to the 0-db mark a write successfull. So if you only reserve 6 shards. You actually make it mandatory for all shards to be online to be able to write new data. If you only care about read availability then a policy of 4/2 allow 2 shards to be down and still be able to retrieve the data.

BolaNasr commented 4 years ago

Fixed at https://github.com/threefoldtech/jumpscaleX_threebot/commit/325b26ca3ca8d70973634be5f55a641c529d254c

AhmedHanafy725 commented 4 years ago

Verified I couldn't try with 4/2 storage as there is no resources, but when I tried with 2/1 it works fine with 3 0-db which means it creates the needed shard.

zos.reservation_result(459582)                                                                                                           
    category = "ZDB"
    data_json = "{\n \"IP\": \"2a02:1802:5e:0:bc57:51ff:feb1:cfdc\",\n \"Namespace\": \"459582-2\",\n \"Port\": 9900\n}"
    epoch = "2020/04/27 20:04:51"
    message = ""
    signature = "2c3f9e5ca4d427a1d8782c93890199943abffe96313cc0b759ead4d3d6e9c95cc5b05b8259383e216e7136b3df570b09cd1f93ce22ab7a5c69cfdae991427809"
    state = "OK"
    workload_id = "459582-2"

    category = "ZDB"
    data_json = "{\n \"IP\": \"2a02:1802:5e:0:1c6e:75ff:fe26:f4b4\",\n \"Namespace\": \"459582-1\",\n \"Port\": 9900\n}"
    epoch = "2020/04/27 20:04:51"
    message = ""
    signature = "fabbf70b1aeb493a39e9a23e888b8df7bd5c34bd641653b0f202a8918c909c8a082e5c7a2b64e3d0b71c6576af2b7558773415164456f4a7b31bc98085f69002"
    state = "OK"
    workload_id = "459582-1"

    category = "ZDB"
    data_json = "{\n \"IP\": \"2a02:1802:5e:0:8443:45ff:fe69:df65\",\n \"Namespace\": \"459582-3\",\n \"Port\": 9900\n}"
    epoch = "2020/04/27 20:04:51"
    message = ""
    signature = "5ea7d3b9e99e15a06c3b2a20b7a931beb410eef20dbd39389e8ec8ae8040a89dfdcea6125d41cbd1b0e127192cbf441318d488a068de967cbc48a7a9b8fe5006"
    state = "OK"
    workload_id = "459582-3"

    category = "VOLUME"
    data_json = "{\n \"volume_id\": \"459582-4\"\n}"
    epoch = "2020/04/27 20:04:51"
    message = ""
    signature = "ff7bf7d3d6a1c0d1a34d819a0bbafbc31f56c7b9172c75c5009c08802c4b6380fed0e90a7da802cd96fc79efbd113c80da1007dfe383c999394c9d136b066407"
    state = "OK"
    workload_id = "459582-4"

    category = "CONTAINER"
    data_json = "{\n \"id\": \"459582-5\",\n \"ipv4\": \"10.171.0.3\",\n \"ipv6\": \"2a02:1802:5e:0:b0cb:baff:fea2:6976\"\n}"
    epoch = "2020/04/27 20:04:53"
    message = ""
    signature = "4c5f9054af4fdbc85a60560e63a9b7077e6eef9ed26de479a0cc309b2cdcca7d5a46789c377ed83e75baa36e2f8f28ccda33c912ee3eb2722087ce46e2361d00"
    state = "OK"
    workload_id = "459582-5"