Permalink
Browse files

Support for big VEID numbers (issue 494).

  • Loading branch information...
1 parent a9724cd commit fab093e103f9b2adc7c69a6f2b521e06215302cd @sibprogrammer committed Feb 23, 2013
@@ -125,7 +125,7 @@ def sync_server_templates
def sync_virtual_servers
ves_on_server = rpc_client.exec('vzlist', '-a -H -o veid,hostname,ip,status')['output'].split("\n")
# skip error lines
- ves_on_server = ves_on_server.find_all{ |item| item =~ /^\s+\d+/ }
+ ves_on_server = ves_on_server.find_all{ |item| item =~ /^\s*\d+/ }
ves_ids_on_server = ves_on_server.map{ |vzlist_entry| vzlist_entry = vzlist_entry.split.first }
@@ -0,0 +1,9 @@
+class ChangeIdentityTypeInVirtualServer < ActiveRecord::Migration
+ def self.up
+ change_column :virtual_servers, :identity, :string
+ end
+
+ def self.down
+ change_column :virtual_servers, :identity, :integer
+ end
+end
View
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130202132959) do
+ActiveRecord::Schema.define(:version => 20130223060327) do
create_table "background_jobs", :force => true do |t|
t.string "description"
@@ -127,7 +127,7 @@
add_index "users", ["login"], :name => "index_users_on_login", :unique => true
create_table "virtual_servers", :force => true do |t|
- t.integer "identity"
+ t.string "identity"
t.string "ip_address"
t.string "host_name"
t.string "state", :limit => 20

0 comments on commit fab093e

Please sign in to comment.