What happened
:
[νμ 1]
"already exists" occurs for non-existing namespace
cb-tumblebug/src/testclient/scripts/2.configureTumblebug# ./list-ns.sh
####################################################################
## 0. Namespace: List
####################################################################
{
"ns": [
{
"id": "inno-demotest-ns",
"name": "inno-demotest-ns",
"description": "innogrid namespace for test"
},
{
"id": "mzc-demotest-ns",
"name": "mzc-demotest-ns",
"description": "mzc\nnamespace"
}
]
}
cb-tumblebug/src/testclient/scripts/2.configureTumblebug# ./create-ns.sh
####################################################################
## 2. Namespace: Create
####################################################################
{
"message": "CreateNs(); The namespace ns-jhseo already exists."
}
[νμ 2]
NS λ₯Ό μλ‘ λ§λ λ€ "List NS" ν΄λ 보μ΄μ§ μμ
cb-tumblebug/src/testclient/scripts/2.configureTumblebug# ./create-ns.sh
####################################################################
## 2. Namespace: Create
####################################################################
{
"id": "ns-jhseo2",
"name": "ns-jhseo2",
"description": "NameSpace for General Testing"
}
cb-tumblebug/src/testclient/scripts/2.configureTumblebug# ./list-ns.sh
####################################################################
## 0. Namespace: List
####################################################################
{
"ns": [
{
"id": "inno-demotest-ns",
"name": "inno-demotest-ns",
"description": "innogrid namespace for test"
},
{
"id": "mzc-demotest-ns",
"name": "mzc-demotest-ns",
"description": "mzc\nnamespace"
}
]
}
["Get NS" λ μλν¨]
cb-tumblebug/src/testclient/scripts/2.configureTumblebug# ./get-ns.sh
####################################################################
## 0. Namespace: Get
####################################################################
{
"id": "ns-jhseo2",
"name": "ns-jhseo2",
"description": "NameSpace for General Testing"
}
[Objects μ‘°ν - /ns λ‘ μ‘°ννλ©΄ ns-jhseo, ns-jhseo2 보μ΄μ§ μμ]
{
"object": [
"/ns/inno-demotest-ns",
"/ns/mzc-demotest-ns",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22/vm/aaaa",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22/vm/asynctest",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22/vm/asynctest2",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22/vm/asynctest3",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22/vm/asynctest4",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22/vm/simple-vm-import",
"/ns/mzc-demotest-ns/mcis/mcis-expert-only22/vm/vm-test0001",
"/ns/mzc-demotest-ns/mcis/mzc-aws-mcis-01",
"/ns/mzc-demotest-ns/mcis/mzc-aws-mcis-01/vm/mzc-aws-mcis-server-01",
"/ns/mzc-demotest-ns/mcis/mzc-aws-mcis-01/vm/mzc-gcp-mcis-server-02",
"/ns/mzc-demotest-ns/mcis/mzc-gcp-mcis-01",
"/ns/mzc-demotest-ns/mcis/mzc-gcp-mcis-01/vm/expert-vm-01-add",
"/ns/mzc-demotest-ns/mcis/mzc-gcp-mcis-01/vm/mzc-gcp-mcis-server-01"
]
}
[Objects μ‘°ν - /ns/ns-jhseo λ‘ μ‘°ννλ©΄ /ns/ns-jhseo κ° λ³΄μ]
{
"object": [
"/ns/ns-jhseo",
"/ns/ns-jhseo/cpuSize/1/memSize/1/diskSize/0/specId/jhseo-wt-test",
"/ns/ns-jhseo/resources/image/jhseo-wt-test",
"/ns/ns-jhseo/resources/securityGroup/jhseo-wt-test",
"/ns/ns-jhseo/resources/spec/jhseo-wt-test",
"/ns/ns-jhseo/resources/sshKey/jhseo-wt-test",
"/ns/ns-jhseo/resources/vNet/jhseo",
"/ns/ns-jhseo/resources/vNet/jhseo-wt-test",
"/ns/ns-jhseo2"
]
}
[Objects μ‘°ν - /ns/ns-jhseo2 λ‘ μ‘°ννλ©΄ /ns/ns-jhseo2 κ° λ³΄μ]
{
"object": [
"/ns/ns-jhseo2"
]
}
What you expected to happen
:
How to reproduce it (as minimally and precisely as possible)
:
Anything else we need to know?
:
Environment
Proposed solution
:
Any other context
:
[μΆμ ]
Key-Value store λ₯Ό μ¬μ©νλ κ³Όμ μμ, entry handling μ μ λλ‘ νμ§ λͺ»ν΄ μΌμ΄λ νμμΌμ§..?
ns λ‘ μμνλ NS μ λν΄μλ μμ νμμ΄ λ°μνκ³ ,
ns λ‘ μμνμ§ μλ NS μ λν΄μλ μμ νμμ΄ λ°μνμ§ μκ³ μμ΅λλ€.
cb-tumblebug/src/testclient/scripts/2.configureTumblebug# ./list-ns.sh
####################################################################
## 0. Namespace: List
####################################################################
{
"ns": [
{
"id": "inno-demotest-ns",
"name": "inno-demotest-ns",
"description": "innogrid namespace for test"
},
{
"id": "jhseo-test",
"name": "jhseo-test",
"description": ""
},
{
"id": "jhseo-test2",
"name": "jhseo-test2",
"description": ""
},
{
"id": "mzc-demotest-ns",
"name": "mzc-demotest-ns",
"description": "mzc\nnamespace"
}
]
}
μ΄μνλ€μ.. ν ... μλλ κΈ°λ₯μ΄μλκ±° κ°μλ°..
μ΅κ·Όμ μ΄κ²μ κ² λ³κ²½νλ©΄μ μν₯μ΄ κ° κ² κ°κΈ°λ νκ³ .. γ
γ
cb-storeμ μν₯λ μμΌλ €λμ.. γ
γ
μΌλ¨ νμ¬ λΌμ΄νμ¬μ΄ν΄ μ 리νλλ° μ€λ₯κ° μ’ μμ΄μ μ²λ¦¬νκ³ ν¨κ» 보λλ‘ νκ² μ΅λλ€..
ns-01, ns-02 λ±λ‘ ν,
μ€λΈμ νΈλ‘ 리μ€νΈ μ‘°ν(Key: /ns or /ns/ νκΈ°λ₯Ό νμ λμ κ²°κ³Όλ
/ns/ns-01 λ§ λμ€κ³ /ns/ns-02 λ λμ€μ§ μμ΅λλ€.
μ€λΈμ νΈ μ‘°ν κΈ°λ₯μ μ½λλ₯Ό 보면, λ¨μν CBStore μ GetListλ§ νκΈ° λλ¬Έμ
μ΄ μ€λ₯λ CBStoreμμ κΈ°μΈνλ€κ³ νλ¨μ΄ λ©λλ€.
// func GetObjectList returns IDs of each child objects that has the same key.
func GetObjectList(key string) []string {
keyValue, _ := CBStore.GetList(key, true)
var childIdList []string
for _, v := range keyValue {
childIdList = append(childIdList, v.Key)
}
return childIdList
}
@powerkimhub μ€λ₯ μν© μ°Έκ³ νμκΈ° λ°λλλ€.
CBStroreμ ν΄λΉ μ€λ₯λ₯Ό μμ νλ©΄, λ€λ₯Έ FWμλ μν₯μ΄ μμ΄μ,
νΉμ λͺ¨λ₯Ό νμ₯μ λ°©μ§νκΈ° μν΄μ
μΉ΄νΈμΉλ
Έ νμ¬κΉμ§λ μμ νμ§ μκ³ , λ¦΄λ¦¬μ€ μ μ μμ λ° ν
μ€νΈνλ κ²μΌλ‘ μ΄μΌκΈ° λμμ΅λλ€.
κ·Έ λμ, νμμ μΌλ‘, CB-TBμ ns λ±μ μ¬μ©νμ€ λ μ μ μ¬νμ 곡μ λ립λλ€.
CB-TB (κ·Έλ¦¬κ³ CB-Ladybug, μλ§λ CB-Spider, .. λ±λ λͺ¨λ κ΄λ ¨) μ μ€λΈμ νΈ(ns, mcis, vm, vnet, sg, ...)λ₯Ό μμ±νμ€ λ,
name (λλ id) κ°μΌλ‘ ν΄λΉ stringμ ν¬ν¨νλ ν¨ν΄μ νΌν΄μ£ΌμκΈ° λΆνλ립λλ€.
(μλ₯Ό λ€μ΄ nsλ₯Ό μμ±νμ€λ, nsλΌλ λ¨μ΄λ₯Ό νΌν΄μ£Όμκ³ , mcis μμ±νμ€ λ mcisλ₯Ό νΌν΄μ£Όμλ λ±μ ν¨ν΄μ
λλ€.)
λͺ
ννκ² λ¬Έμ λ₯Ό νμΈν κ²μ ns μ΄λ©°, λ€λ₯Έ μ€λΈμ νΈλ λ¬Έμ λ°μμ μμ§κ° μμΌλ―λ‘
νΉμ μ€λΈμ νΈ λ±λ‘ ν, 리μ€νΈ κΈ°λ₯μ μννλλ°
λ±λ‘ν μ€λΈμ νΈκ° 리μ€νΈμ ν¬ν¨μ΄ λμ΄ μμ§ μλ€κ±°λ νλ κ²½μ°κ° λ°μνλ©΄, 리ν¬νΈλ₯Ό λΆν λ립λλ€.
@powerkimhub says (in this message):
κ΄λ ¨ μ΄μλ 10,000κ° κ°κΉμ΄ Object(Key/Value)κ° λ±λ‘λμμ λ λ°μνλ λ¬Έμ μ λλ€.
νμ¬ cb-store: GetList()κ° fetchμ 10,000κ° limitμ΄ μ‘΄μ¬ν©λλ€.
Related issue: https://github.com/cloud-barista/cb-store/issues/27