Re: [Openstack] use php to make container public or not
Appreciate it Thanks Hugo's iPhone pf shineyear shin...@gmail.com 於 2011/11/23 12:47 寫道: php curl have a shit feature: can not post an empty http header, so if you want to perform a command like this in php: swift -A http://10.38.10.127:8080/auth/v1.0 -U AUTH_testa27:AUTH_testu27 -K testp post -r ' ' mycontainer2 the X-Container-Read will not be send, so you can not make a container unpublic from public i write an example code to show how make it work with php, just use ' not and plus \n at the end hope can make some help ?php $prefix = AUTH_; $account_name = $prefix.testa27; $user_name = $prefix.testu27; $user_pass = testp; $container = mycontainer2; $user_token = AUTH_tkb21f5fcfea144cf9a99ed1de9a577db2; $path = /v1/.$account_name./.$container; #if you want to make container public use this #$http_headers = array(X-Auth-Token: .$user_token, 'X-Container-Read: .r:*'); #if you want to make container not public use this $http_headers = array(X-Auth-Token: .$user_token, 'X-Container-Read: \n'); print_r($http_header); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, http://10.38.10.127:8080.$path); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $http_headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($ch, CURLINFO_HEADER_OUT, true); print test set container public\n; curl_exec($ch); $headers = curl_getinfo($ch, CURLINFO_HEADER_OUT); print_r($headers); if (!curl_errno($ch)) { $info = curl_getinfo($ch); if ((int)($info['http_code'] / 100) != 2) { print set container public return error .$info['http_code'].\n; return -1; } } else { print set container public error\n; return -2; } curl_close($ch); ? ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Keystone + Swift integration
Hi Hugo, We changed out everything to keystone2 , now we're getting a 404 when we try to create the container, maybe the account autocreation is not working properly any thoughts ? Regards On Wed, Nov 23, 2011 at 10:20 AM, Kuo Hugo tonyt...@gmail.com wrote: Hi Leandro , Post on launchpad QA will be a better place though. Plz post it on launchpad , and we will jump to there for further discussion. 1. Verify that your keystone is running , via curl -v -H X-Auth-User: MAX -H X-Auth-Key: Infa http://%keystone_IP%:5000/v1.0 If keystone working properly , should return X-Auth-Token X-Storage-url etc. After step 1 ... Use the returned X-Auth-Token and X-Storage-Url for the following cURL cmd curl -k -v -H X-Auth-Token: %token% %Returned X-storage-Url% * *http:// %Swift-proxy_IP%:8080/v1/AUTH_%tenant_id% I guess it will be curl -v -k -H X-Auth-Token: 1234567890 http://172.16.0.88:8080/v1/AUTH_%tenant_ID% If so , I believe that your problem is on the protocol of Swift-proxy , as your post , it's under https in your proxy-server.conf . To disable it by comment cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key or correct the endpoint of swift to https.. If you were deploying keystone via cloudbuilder/devstack script ... You might need to check the sampledata . With swift client v1.0 , it needs the value of Tenant_Id in USERS table. Hope it help ... -- +Hugo Kuo+ tonyt...@gmail.com hugo@cloudena.com +886-935-004-793 www.cloudena.com ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Keystone + Swift integration
Im getting 404 with both tools, curl and swift , we're using the repo where you commited 41 minutes ago Regards On Wed, Nov 23, 2011 at 10:51 AM, Chmouel Boudjnah chmo...@openstack.orgwrote: Hi, Which version did you use for keystone2 from cloudbuilders github trunk? can you try again (I just updated some fixes to it just now). And what do you mean you are getting 404, how do you test it ? with swift cli or via curl ? Chmouel. On Wed, Nov 23, 2011 at 2:27 PM, Leandro Reox leandro.r...@gmail.com wrote: Hi Hugo, We changed out everything to keystone2 , now we're getting a 404 when we try to create the container, maybe the account autocreation is not working properly any thoughts ? Regards On Wed, Nov 23, 2011 at 10:20 AM, Kuo Hugo tonyt...@gmail.com wrote: Hi Leandro , Post on launchpad QA will be a better place though. Plz post it on launchpad , and we will jump to there for further discussion. 1. Verify that your keystone is running , via curl -v -H X-Auth-User: MAX -H X-Auth-Key: Infa http://%keystone_IP%:5000/v1.0 If keystone working properly , should return X-Auth-Token X-Storage-url etc. After step 1 ... Use the returned X-Auth-Token and X-Storage-Url for the following cURL cmd curl -k -v -H X-Auth-Token: %token% %Returned X-storage-Url% http://%Swift-proxy_IP%:8080/v1/AUTH_%tenant_id% I guess it will be curl -v -k -H X-Auth-Token: 1234567890 http://172.16.0.88:8080/v1/AUTH_%tenant_ID% If so , I believe that your problem is on the protocol of Swift-proxy , as your post , it's under https in your proxy-server.conf . To disable it by comment cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key or correct the endpoint of swift to https.. If you were deploying keystone via cloudbuilder/devstack script ... You might need to check the sampledata . With swift client v1.0 , it needs the value of Tenant_Id in USERS table. Hope it help ... -- +Hugo Kuo+ tonyt...@gmail.com hugo@cloudena.com +886-935-004-793 www.cloudena.com ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Keystone + Swift integration
Need more informations . Maybe you can check the log of keystone , verifying where's the 404 come from If keystone log tell you that it already return 200 to swift . I think the 404 is returned from swift. the 404 bad request , should be log in proxy log and keystone log. -- +Hugo Kuo+ tonyt...@gmail.com hugo@cloudena.com +886-935-004-793 www.cloudena.com ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
[Openstack] Recommendation: Image Launcher for Lab
hi all any tips to make a script to make all image become x images, and automatically re-image. this is the scenario i want to make openstack as the platform for education, and there are 30-PC in the lab, and 1 server 1 server will act as cloud server, with 30 images. so every student can learn linux there, and also the cloud automatically remove the yesteraday linux (ubuntu), so next student can use as blank new linux. also we want tutorial on hand for them to install linux. rather current model, we re-install the linux in PC, that is wasting time. F ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
[Openstack] [QA] Team IRC meeting moved back one hour
Hi QAers! So, to make West Coast US folks a little happier, we are moving the regular Wednesday IRC meeting for the QA team back one hour: 9am PST 12pm EST 5pm UTC See you all there :) Cheers, -jay ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Recommendation: Image Launcher for Lab
I would recommend using Orchestra: http://cloud.ubuntu.com/2011/10/getting-started-with-ubuntu-orchestra-servers-in-concert/ Cheers! -jay On Wed, Nov 23, 2011 at 9:49 AM, Frans Thamura fr...@meruvian.org wrote: hi all any tips to make a script to make all image become x images, and automatically re-image. this is the scenario i want to make openstack as the platform for education, and there are 30-PC in the lab, and 1 server 1 server will act as cloud server, with 30 images. so every student can learn linux there, and also the cloud automatically remove the yesteraday linux (ubuntu), so next student can use as blank new linux. also we want tutorial on hand for them to install linux. rather current model, we re-install the linux in PC, that is wasting time. F ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
[Openstack] Contributor Introduction: Lloyd Dewolf
Hello stackers! This is an email to introduce myself. Summary: I'm looking forward to participating in the OpenStack movement! Hooah! You may know me as my stage name Lloyd Budd [1] from the still hit TV show WordPress, where I've participated these last 6 years, the last 5 working for Automattic as WordPress.com VIP Services Technical Lead (pointy haired non-programmer) mostly in support, quality assurance, and outreach (commenting on blogs, ha!). One of my favorite experiences in the WordPress community has been the success of my brainchild Happiness Bars support desk [2] at WordPress WordCamp conferences. Every year (4), I ran the Happiness Bar at WordCamp SF ( sf.wordcamp.org ) the biggest, and granddaddy of the WordCamps. I don't know if we are currently doing these at OpenStack related community events, but I'd be eager to participate. Later all get some info in the wiki, and start a separate thread. You may also know me from the cancelled show Flock, the Social Browser. Web 2.0 poster child that never did well in the ratings. I was an early team member there, but only stayed a year of it's 6 year existence. I did a short stint before that working on the un-Netscape, unopen Netscape 8 browser and 9 -- the team behind it was incredible, but AOL insisted on a monstrosity and so that is what we created [3]. I did some small Firefox participating along the way. My career started with 4 years with IBM on a special DB2 Multi-platform (Windows, Linux, Unix) High Availability and Down Systems team as a Advanced Support Analyst. My OSS participations at the time were confined to my local LUG -- I am reminded of one gem where I asked Debian Legal GPL , what does it mean? -- the name that is., http://comments.gmane.org/gmane.linux.debian.devel.legal/11173 . I'm hoping this is the gig where I break into film! This week I've started with Joshua McKenty and Christopher MacGown's Piston Cloud Computing. My primary role is Advanced Technical Support Lead. I'm relocating to San Francisco, BC, Canada from Victoria, BC, Canada. And will be traveling back and forth two weeks at a time until wife Julia and two incredible young children join me here in March. I still have lots to do before... I can get paid ;-) You can find out more about me with a web search on my names, or foolswisdom. Cheers, Lloyd -- 1. Legal name until I more recently reverted to my birth name. 2. Originally Genius Bar, that SM encumbered name not being my idea ;-) 3. Dual rendering engine with live switching -- cookies, history and all: Mozilla Gecko (Firefox) Microsoft Trident (IE). It almost made sense at the time in 2004, where many sites still only worked well on IE. It was before I came on board, but I'm told the team had to fight to get the Gecko engine included at all -- imagine what that would have been, a Netscape with zarro mozilla code. ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [QA] Team IRC meeting moved back one hour
Jay Pipes wrote: Hi QAers! So, to make West Coast US folks a little happier, we are moving the regular Wednesday IRC meeting for the QA team back one hour: 9am PST 12pm EST 5pm UTC Updated the gCal and http://wiki.openstack.org/Meetings -- Thierry Carrez (ttx) Release Manager, OpenStack ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [QA] Team IRC meeting moved back one hour
Thank you, Thierry :) On Wed, Nov 23, 2011 at 10:10 AM, Thierry Carrez thie...@openstack.org wrote: Jay Pipes wrote: Hi QAers! So, to make West Coast US folks a little happier, we are moving the regular Wednesday IRC meeting for the QA team back one hour: 9am PST 12pm EST 5pm UTC Updated the gCal and http://wiki.openstack.org/Meetings -- Thierry Carrez (ttx) Release Manager, OpenStack ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [nova-testing] Efforts for Essex
Thanks Soren, I see what you're doing now and it makes perfect sense. It'll be a nice helper class. My only snipe would be that mox is generic to any library and this fake only gives the benefit to db operations. We have to remember It's a db operation, so I have to do this. It's another method call so I need to do that How much effort would it be to make it into a better/more generic mox library? -S From: Soren Hansen [so...@linux2go.dk] Sent: Tuesday, November 22, 2011 7:38 PM To: Sandy Walsh Cc: openstack@lists.launchpad.net Subject: Re: [Openstack] [nova-testing] Efforts for Essex 2011/11/22 Sandy Walsh sandy.wa...@rackspace.com: I suspect the problem is coming in with our definition of unit tests. I don't think a unit test should be calling out of the method being tested at all. So anything beyond stubbing out the methods within the method being tested seems like noise to me. What you're describing sounds more like integration tests. If I'm testing a method that includes a call to the db api, the strategy with which I choose to replace that call with a double does not change whether the test is a unit test or not. I'm simply replacing this: def test_something(self): self.mox.StubOutWithMock(db, 'instance_get') db.instance_get(mox.IgnoreArg(), mox.IgnoreArg() ).AndReturn({'name': 'this or that', 'instance_type_id': 42}) exercise_the_routine_that_will_eventually_do_an_instance_get() verify_that_the_system_is_now_in_the_desired_state() or this: def test_something(self): def fake_instance_get(context, instance_uuid): return {'name': 'this or that', 'instance_type_id': 42} self.stubs.Set(nova.db, 'instance_get_by_uuid', fake_instance_get) exercise_the_routine_that_will_eventually_do_an_instance_get() verify_that_the_system_is_now_in_the_desired_state() with this: def test_something(self): ctxt = _get_context() db.instance_create(ctxt, {'name': 'this or that', 'instance_type_id': 42}) exercise_the_routine_that_will_eventually_do_an_instance_get() verify_that_the_system_is_now_in_the_desired_state() Not only is this -- to my eye -- much more readable, but because the fake db driver has been proven (by the db test suite) to give responses that are exactly like what the real db driver would return, we have better confidence in the output of the test. E.g. if the real db driver always sets a particular attribute to a particular default value, it's remarkably easy to forget to follow suit in an ad-hoc mock, and it's even easier to forget to update the countless ad-hoc mocks later on, if such a new attribute is added. This may or may not affect the tested code's behaviour, but if that was easy to see/predict, we wouldn't need tests to begin with :) Over the course of this thread, I've heard many people raise concerns about whether we'd really be testing the fake or testing the thing that depends on the fake. I just don't get that at all. Surely a fake DB driver that is proven to be true to its real counterpart should make us *more* sure that we're testing our code correctly than an ad-hoc mock whose correctness is very difficult to verify? I thought the motive of your thread was to create fast/small/readable/non-brittle/maintainable tests. The motive was to gather testing related goals, action items, thoughts, complaints, whatever. It just so happens that a lot of people (myself included) think that speeding up the test suite and categorising tests into true unit tests and everything else are important things to look at. Integration tests, while important, make this goal difficult. I agree. I'm very happy that there's a lot of people doing a lot of work on the integration test suite so that I can focus more on unit tests. As I think I've mentioned before, unit tests are really all we can expect people to run. So, if we're both talking about real unit tests, I don't seen the benefit of the fake. Please elaborate (with my above comments in mind). As for my example of 123 vs abc, that was a bad example. Let me rephrase ... in one test I may want to have an environment that has no pre-existing instances in the db. In another test I may want to have an environment with a hundred instances. I'd like to understand how configuring the fake for both of these scenarios will be any easier than just having a stub. It seems like an unnecessary abstraction. First of all, the DB is blown away between each individual test, so we don't have to worry about its initial state. In the first scenario, I'd do nothing. I have a clean slate, so I'm good to go. In the second scenario, I'd just do 100 calls to db.instance_create. With the mock approach, I'd write a custom instance_get with a 100 if/elif clauses, returning whatever makes sense for the given instance_id. Mind you, the objects that I return from
Re: [Openstack] Contributor Introduction: Lloyd Dewolf
Lloyd Dewolf wrote: Hello stackers! This is an email to introduce myself. Summary: I'm looking forward to participating in the OpenStack movement! Hooah! [...] Welcome, Lloyd ! Always good to see new motivated people join our technical community ! Are you on IRC yet ? -- Thierry Carrez (ttx) Release Manager, OpenStack ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] the instance'ip lease time in DHCPflat mode
This is a bug. The dhcp least time flag is supposed to be used in place of the 120s. It must have been removed at some point. Can you please file a bug on launchpad. If you are able to submit a review request in gerrit as well, that would be fantastic. Vish On Nov 22, 2011, at 9:45 PM, ljvsss wrote: hi: when i use DHCPflat mode,the instance to get ip in fews times in the log of nova-network.log like this: 2011-11-23 13:33:30,840 DEBUG nova.network.manager [8d6b0be9-1ae7-4f69-a10c-c4d6a42ebc55 None None] Leased IP |10.0.0.22| from (pid=12204) lease_fixed_ip /usr/lib/python2.7/dist-packages/nova/network/manager.py:642 2011-11-23 13:34:14,850 DEBUG nova.network.manager [cf1929d3-03c5-427f-b41b-beef610b0db2 None None] Leased IP |10.0.0.22| from (pid=12204) lease_fixed_ip /usr/lib/python2.7/dist-packages/nova/network/manager.py:642 when i change the flag dhcp_lease_time in the network/linux_net.py 58 flags.DEFINE_integer('dhcp_lease_time', 1200, 59 'Lifetime of a DHCP lease') it's still 120s dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-br1.pid --listen- address=10.0.0.3 --except-interface=lo --dhcp-range=10.0.0.2,static,120s --dhcp-lease-max=512 --dhcp- hostsfile=/var/lib/nova/networks/nova-br1.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro so i change this(in network/linux_net.py ): 626'--dhcp-range=%s,static,120s' % network_ref['dhcp_start'], 626'--dhcp-range=%s,static,%d' % (network_ref['dhcp_start'],FLAGS.dhcp_lease_time), it's work well dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-br10.pid --listen-address=192.168.0.6 --except-interface=lo --dhcp-range=192.168.0.2,static,1200 --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-br10.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro root 12620 0.0 0.0 7932 1056 pts/2S+ 00:43 0:00 grep --color=auto dns ljvsss ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
[Openstack] OpenStack Security Group
Hello again, I'll be starting slowly with looking at documentation and the wiki. I always look at security first, and then try to stay away thereafter ;-) Problem: Currently a Google search for openstack security issue returns the wrong page: http://wiki.openstack.org/Governance/Proposed/OpenStack%20Security%20Group which is a draft and does not provide contact and reporting process information. Possibly Solutions: 1. This and other likely search terms should land on a page with the security issue reporting steps and current known vulnerabilities. ex. firefox security issue First two results are: http://www.mozilla.org/security/known-vulnerabilities/ http://www.mozilla.org/security/ 2. Identify the webpages that link to the security page(s), and develop the language for those links. If I should be discussing this elsewhere please let me know, or want additional context or thoughts please let me know. Hope that helps, Lloyd ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
[Openstack] Image contextualization
Hello everyone, I'm interested in the functionallity described in the blueprint: https://blueprints.launchpad.net/nova/+spec/configuration-drive It was implemented for Diablo but I can't find any reference in the documentation. How to use this feature? Thanks a lot, Belmiro ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [nova-testing] Efforts for Essex
2011/11/23 Sandy Walsh sandy.wa...@rackspace.com: Thanks Soren, I see what you're doing now and it makes perfect sense. It'll be a nice helper class. Cool. My only snipe would be that mox is generic to any library and this fake only gives the benefit to db operations. We have to remember It's a db operation, so I have to do this. It's another method call so I need to do that I think if it more like for db, I don't need to concern myself with test doubles. There's still a bunch of other stuff where that's not true, but for db, it Just Works[tm]. How much effort would it be to make it into a better/more generic mox library? I don't see how that would even be possible? I'm writing a complete db driver, backed by Python dicts rather than sqlalchemy+sqlite. I can't imagine how you'd build something that generally can expose an API and behaviour identical to an arbitrary module, which seems to be what you're suggesting. Ok, that's not entirely true. I can imagine injecting a proxy in front of the real DB driver, record its behaviour, and on subsequent test runs, I'd return canned responses, but I really wouldn't recommend something like that. It's great of getting some insight into how a particular module is used. You can use that information when writing stubs, mocks, fakes, whatever based on it, but I wouldn't rely on being able to just replay its traffic and have everything work. Am I completely misunderstanding you? -- Soren Hansen | http://linux2go.dk/ Ubuntu Developer | http://www.ubuntu.com/ OpenStack Developer | http://www.openstack.org/ ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [nova-testing] Efforts for Essex
:) yeah, you're completely misunderstanding me. So, you've made a much better StubOutWithMock() and slightly better stubs.Set() by (essentially) ignoring the method parameter checks and just focusing on the return type. Using your example: def test_something(self): def fake_instance_get(context, instance_uuid): return {'name': 'this or that', 'instance_type_id': 42} self.stubs.Set(nova.db, 'instance_get_by_uuid', fake_instance_get) exercise_the_routine_that_will_eventually_do_an_instance_get() verify_that_the_system_is_now_in_the_desired_state() Could your library be expanded to allow: def test_something(self): self.sorens_mox.Set(nova.db, 'instance_get_by_uuid', {'name': 'this or that', 'instance_type_id': 42}) self.sorens_mox.Set(nova.my_module, 'get_list_of_things', range(10)) exercise_the_routine_that_will_eventually_do_an_instance_get_and_get_list() verify_that_the_system_is_now_in_the_desired_state() See what I mean? Side note: I don't view tests that permit exercise_the_routine_that_will_eventually_do_an_instance_get() calls to be unit tests ... they're integration tests and the source of all this headache in the first place. A unit test should be exercise_the_routine_that_will_directly_call_instance_get() Hopefully we're saying the same thing on this last point? -S From: Soren Hansen [so...@linux2go.dk] Am I completely misunderstanding you? ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [nova-testing] Efforts for Essex
I understand what you're proposing, but I'm backtracking a little. (my kingdom for you and a whiteboard in the same room :) I think that you could have a hybrid of your db.do_something(desired_return_value) and self.stubs.Set(nova.db, 'instance_get_by_uuid', fake_instance_get) (which I don't think is terrible other than requiring a nested method) to produce: self.sorens_mox.Set(nova.db, 'instance_get_by_uuid', {'name': 'this or that', 'instance_type_id': 42}) which would work with things other than just the db. --- So, you've made a much better StubOutWithMock() and slightly better stubs.Set() by (essentially) ignoring the method parameter checks and just focusing on the return type. No, no. Read my e-mail again. I don't want to do it that way either. I showed two examples of what I'd like to get rid of, followed by what I'd like to do instead. ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [nova-testing] Efforts for Essex
2011/11/23 Sandy Walsh sandy.wa...@rackspace.com: I understand what you're proposing, but I'm backtracking a little. (my kingdom for you and a whiteboard in the same room :) Well, IRC would be a good start. :) I haven't seen you on IRC for days? I think that you could have a hybrid of your db.do_something(desired_return_value) I may be reading too much into this, but this example suggests you're not following me, to be honest. db.instance_create is not a method I'm adding. It is an existing method. It's the method you use to add an instance to the data store, so it's not so much about passing it desired return values. It's about adding an instance to the database in the exactly same fashion as production could would have done it, thus allowing subsequent calls to instance_get (or any of the ~30 other methods that return one or more Instance objects) to return it appropriately. And by appropriately, I mean: with all the same attributes as one of the real db drivers would have returned. to produce: self.sorens_mox.Set(nova.db, 'instance_get_by_uuid', {'name': 'this or that', 'instance_type_id': 42}) We have this functionality today. My example: self.stubs.Set(nova.db, 'instance_get_by_uuid', fake_instance_get) was copied from one of our existing tests. -- Soren Hansen | http://linux2go.dk/ Ubuntu Developer | http://www.ubuntu.com/ OpenStack Developer | http://www.openstack.org/ ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Keystone + Swift integration
Hi Leandro, If you search all swift services logs for the transaction Id returned what do you see ? Marcelo Martins Openstack-swift btorch...@zeroaccess.org “Knowledge is the wings on which our aspirations take flight and soar. When it comes to surfing and life if you know what to do you can do it. If you desire anything become educated about it and succeed. “ On Nov 23, 2011, at 8:25 AM, Leandro Reox wrote: Im getting 404 with both tools, curl and swift , we're using the repo where you commited 41 minutes ago Regards On Wed, Nov 23, 2011 at 10:51 AM, Chmouel Boudjnah chmo...@openstack.org wrote: Hi, Which version did you use for keystone2 from cloudbuilders github trunk? can you try again (I just updated some fixes to it just now). And what do you mean you are getting 404, how do you test it ? with swift cli or via curl ? Chmouel. On Wed, Nov 23, 2011 at 2:27 PM, Leandro Reox leandro.r...@gmail.com wrote: Hi Hugo, We changed out everything to keystone2 , now we're getting a 404 when we try to create the container, maybe the account autocreation is not working properly any thoughts ? Regards On Wed, Nov 23, 2011 at 10:20 AM, Kuo Hugo tonyt...@gmail.com wrote: Hi Leandro , Post on launchpad QA will be a better place though. Plz post it on launchpad , and we will jump to there for further discussion. 1. Verify that your keystone is running , via curl -v -H X-Auth-User: MAX -H X-Auth-Key: Infa http://%keystone_IP%:5000/v1.0 If keystone working properly , should return X-Auth-Token X-Storage-url etc. After step 1 ... Use the returned X-Auth-Token and X-Storage-Url for the following cURL cmd curl -k -v -H X-Auth-Token: %token% %Returned X-storage-Url% http://%Swift-proxy_IP%:8080/v1/AUTH_%tenant_id% I guess it will be curl -v -k -H X-Auth-Token: 1234567890 http://172.16.0.88:8080/v1/AUTH_%tenant_ID% If so , I believe that your problem is on the protocol of Swift-proxy , as your post , it's under https in your proxy-server.conf . To disable it by comment cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key or correct the endpoint of swift to https.. If you were deploying keystone via cloudbuilder/devstack script ... You might need to check the sampledata . With swift client v1.0 , it needs the value of Tenant_Id in USERS table. Hope it help ... -- +Hugo Kuo+ tonyt...@gmail.com hugo@cloudena.com +886-935-004-793 www.cloudena.com ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [nova-testing] Efforts for Essex
haha ... worse email thread ever. I'll catch you on IRC ... we've diverged too far to make sense. -S From: Soren Hansen [so...@linux2go.dk] Sent: Wednesday, November 23, 2011 6:30 PM To: Sandy Walsh Cc: openstack@lists.launchpad.net Subject: Re: [Openstack] [nova-testing] Efforts for Essex 2011/11/23 Sandy Walsh sandy.wa...@rackspace.com: I understand what you're proposing, but I'm backtracking a little. (my kingdom for you and a whiteboard in the same room :) Well, IRC would be a good start. :) I haven't seen you on IRC for days? I think that you could have a hybrid of your db.do_something(desired_return_value) I may be reading too much into this, but this example suggests you're not following me, to be honest. db.instance_create is not a method I'm adding. It is an existing method. It's the method you use to add an instance to the data store, so it's not so much about passing it desired return values. It's about adding an instance to the database in the exactly same fashion as production could would have done it, thus allowing subsequent calls to instance_get (or any of the ~30 other methods that return one or more Instance objects) to return it appropriately. And by appropriately, I mean: with all the same attributes as one of the real db drivers would have returned. to produce: self.sorens_mox.Set(nova.db, 'instance_get_by_uuid', {'name': 'this or that', 'instance_type_id': 42}) We have this functionality today. My example: self.stubs.Set(nova.db, 'instance_get_by_uuid', fake_instance_get) was copied from one of our existing tests. -- Soren Hansen| http://linux2go.dk/ Ubuntu Developer| http://www.ubuntu.com/ OpenStack Developer | http://www.openstack.org/ ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] rpms for rhel5.x to install Open stack Object Storage
Hi Razique: Thanks. I've proposed adding these examples to the docs: https://review.openstack.org/1883 https://review.openstack.org/1888 Lorin -- Lorin Hochstein, Computer Scientist USC Information Sciences Institute 703.812.3710 http://www.east.isi.edu/~lorin On Nov 23, 2011, at 2:44 AM, Razique Mahroua wrote: Hi Lorin, Glance has it's own ways to upload objects : Here are the available ways to do it : Startimg upload glance -v add name=ubuntu-10.10-amd64 is_public=true /root/maverick-server-uec-amd64.tar.gz # OR add property (ex. distro) glance -v add name=ubuntu-10.10-amd64 is_public=true distro=ubuntu 10.10 /root/maverick-server-uec-amd64.tar.gz # Upload from other URL glance -v add name=uubntu-10.04-amd64 is_public=true location=http://uec-images.ubuntu.com/lucid/current/lucid-server-uec-amd64.tar.gz; # Upload qcow2 glance -v add name=ubuntu-11.04-amd64 is_public=true distro=ubuntu 11.04 disk_format=qcow2 /data/images/rock_natty.qcow2 # Other glance-upload --type=kernel ./maverick-server-uec-amd64-vmlinuz-virtual maverick-server-uec-amd64-vmlinuz-virtual glance-upload --type=ramdisk ./maverick-server-uec-amd64-loader maverick-server-uec-amd64-loader glance-upload --type=machine --kernel=7 --ramdisk=8 ./maverick-server-uec-amd64.img maverick-server-uec-amd64.img glance-upload --type=raw --kernel=nokernel --ramdisk=noramdisk ./maverick-server-uec-amd64.img maverick-server-uec-amd64.img_v2 You can also use nova-manage image ... (image_upload/ ramdisk_upload/ kernel_upload) Nuage Co - Razique Mahroua razique.mahr...@gmail.com NUAGECO-LOGO-Fblan_petit.jpg Le 22 nov. 2011 à 16:57, Jay Pipes a écrit : On Mon, Nov 21, 2011 at 9:34 PM, Lorin Hochstein lo...@isi.edu wrote: How does the deprecation of nova-objectstore affect nova support for euca-upload-bundle? Will euca-upload-bundle support go away in the future, or does Glance support euca-upload-bundle through an S3 front-end interface, or something else? Hi Lorin, It's not really that nova-objectstore has gone anywhere... just that it is not being developed further, and while it used to be that if you were using the EC2 API and tooling you would need to have a Nova FLAG.image_service set to nova.images.s3.S3ImageService, this is no longer the case. nova-objectstore is still used in the EC2 API for the purposes of euca2ools, as certain tools like euca-bundle-image only work with an S3 object store. nova-objectstore stores the manifest.xml and compressed image parts during the process of bundling an image. However, the eventual image is stored in Glance. So, nova-objectstore is a service that enables the euca-bundle-image and euca-upload-bundle tools to work with Nova, but it serves no other purpose and is no longer a configurable part of Nova's image management. Hope that makes sense! Cheers, -jay ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp