Displaying 20 results from an estimated 38 matches for "db_host".
2010 Sep 01
1
[PATCH 2/2] Adding the ability to select a Host to start a VM [2/2]
...a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
index 471ec88..1dfd74f 100755
--- a/src/task-omatic/taskomatic.rb
+++ b/src/task-omatic/taskomatic.rb
@@ -355,11 +355,10 @@ class TaskOmatic
end
end
- if task.args
+ if task.args && !task.args.blank?
db_host = db_vm.vm_resource_pool.get_hardware_pool.hosts.find(task.args)
- else
- db_host = find_capable_host(db_vm)
end
+ db_host ||= find_capable_host(db_vm)
node = @qmfc.object(:class => "node", 'hostname' => db_host.hostname)
--
1.7.2.2
2019 Dec 15
2
Parsing variables in config files
...#39;m doing so, but I need to have some domains on different
containers for specific reasons).
In order to keep it all clean, I want to use different PostgreSQL databases
for each container, and I'm running the container with an environment file
containing database parameters, such as:
DB_USER
DB_HOST
DB_NAME
I've been trying to pass these parameters to dovecot's configuration, but
they don't get parsed and I end up with messages like: dovecot: auth:
Error: pgsql(%{env:DB_HOST}): Connect failed to database %{env:DB_NAME}
I've tried to pass variables alone, using import_environme...
2009 Aug 10
1
[PATCH server] Fixed db-omatic so it doesn't die due to an unhandled ActiveRecord::StaleObjectError exception.
...ptimistic locking failed for VM #{vm.description}, retrying."
+ @logger.error e.backtrace
+ return update_domain_state(domain, state_override)
+ end
domain[:synced] = true
end
@@ -234,7 +243,14 @@ class DbOmatic < Qpid::Qmf::Console
#db_host.lock_version = 2
# XXX: This would just be for init..
#db_host.is_disabled = 0
- db_host.save!
+
+ begin
+ db_host.save!
+ rescue ActiveRecord::StaleObjectError => e
+ @logger.error "Optimis...
2006 Oct 19
1
Writing with xapian-tcpsrv and php
Hi,
I think, there is missing constructor function supporting remote
writing for XapianWritableDatabase class in the php bindings (0.9.7).
This code:
$db = new XapianWritableDatabase(remote_open($db_host, $db_port),
$action);
returns:
Fatal error: No matching function for overloaded
'new_XapianWritableDatabase' (...)
$db = new XapianWritableDatabase($path, $action); works fine.
xapian-tcpsrv is running with --writable parameter.
Tom
2010 Jun 16
2
class methods from module where active rec is involved
...method. In a simple test program using a similar approach
where active record is not involved, access to the class methods seems
to work ok. What can I do to make this work or so that I can access
the class methods ?
##################################
require ''active_record''
DB_Host = ''localhost''
DB_Database = ''proj1''
DB_Port = 5432
ActiveRecord::Base.establish_connection(
:adapter => "postgresql",
:host => DB_Host,
:database => DB_Database,
:username => "me"
# :password => "secret"
)...
2010 Aug 26
1
[PATCH] Adding the ability to select a Host to start a VM
...omatic.rb b/src/task-omatic/taskomatic.rb
index 31c38e3..8e80115 100755
--- a/src/task-omatic/taskomatic.rb
+++ b/src/task-omatic/taskomatic.rb
@@ -354,7 +354,12 @@ class TaskOmatic
raise "Virtual machine is currently paused, cannot start, must resume."
end
end
- db_host = find_capable_host(db_vm)
+
+ if task.args
+ db_host = db_vm.vm_resource_pool.get_hardware_pool.hosts.find(task.args)
+ else
+ db_host = find_capable_host(db_vm)
+ end
node = @qmfc.object(:class => "node", 'hostname' => db_host.hostname)
--
1.7....
2009 Aug 10
0
[PATCH server] Fixed db-omatic so it doesn't die due to unhandled exceptions related to saving db objects in update_host_state and update_domain_state.
...ow for VM #{vm.description}"
+ @logger.error "For now, workaround is retrying."
+ return update_domain_state(domain, state_override)
+ end
domain[:synced] = true
end
@@ -234,7 +243,13 @@ class DbOmatic < Qpid::Qmf::Console
#db_host.lock_version = 2
# XXX: This would just be for init..
#db_host.is_disabled = 0
- db_host.save!
+
+ begin
+ db_host.save!
+ rescue
+ @logger.error "Optimistic locking failure on host #{host_info...
2005 Sep 13
1
populating asterisk realtime tables from configfiles
Here is my file to parse and load extensions. No wise cracks about my
code....
DB.php is the Pear DB module. (pear.php.net)
<?php
include('DB.php');
$db_host = '';
$db_name = '';
$db_login = '';
$db_pass = '';
$db_table = 'extensions_table';
define(DBINFO,"mysql://$db_login:$db_pass@$db_host/$db_name");
$db = DB::CONNECT(DBINFO);
if(!DB::isError($db)) {
//we got the db connection
$...
2019 Dec 15
0
Parsing variables in config files
...ome domains on different
>containers for specific reasons).
>
>In order to keep it all clean, I want to use different PostgreSQL
>databases
>for each container, and I'm running the container with an environment
>file
>containing database parameters, such as:
>DB_USER
>DB_HOST
>DB_NAME
>I've been trying to pass these parameters to dovecot's configuration,
>but
>they don't get parsed and I end up with messages like: dovecot: auth:
>Error: pgsql(%{env:DB_HOST}): Connect failed to database %{env:DB_NAME}
>
>I've tried to pass variables a...
2009 Aug 07
1
[PATCH server] Fixed db-omatic to update the host for a running vm when the object_props callback is fired.
...is running, determine the node it is running on"
+ qmf_vm = @session.object(:class => "domain", 'uuid' => vm.uuid)
+ if qmf_vm
+ qmf_host = @session.object(:class => "node", :object_id => qmf_vm.node)
+ db_host = Host.find(:first, :conditions => ['hostname = ?', qmf_host.hostname])
+ @logger.info "VM #{vm.description} is running on node #{db_host.hostname}"
+ vm.host_id = db_host.id
+ end
end
+
vm.state = state
vm.sav...
2009 Nov 13
1
[PATCH server] Replace the occurence of the type @qmfc.object(Qmf::Query.new(:class => "xxx", 'key' => search_key)) for @qmfc.object(Qmf::Query.new(:class => "xxx"), 'key' => search_key) else the search on the key is not functionnal.
...9;uuid' => vm.uuid))
+ qmf_vm = @qmfc.object(Qmf::Query.new(:class => "domain"), 'uuid' => vm.uuid)
if qmf_vm
qmf_host = @qmfc.object(Qmf::Query.new(:class => "node", :object_id => qmf_vm.node))
db_host = Host.find(:first, :conditions => ['hostname = ?', qmf_host.hostname])
@logger.info "VM #{vm.description} is running on node #{db_host.hostname}"
vm.host_id = db_host.id
+ elsif
+ @logger.info "Cannot find in QMF t...
2007 Mar 14
2
login authentication
Hi everyone, i used postfix, dovecot and mysql. I have virtual users and
domains. I have this configuration in dovecot-mysql.conf:
db_host = localhost
db_port = 3306
db_unix_socket = /var/run/mysqld/mysqld.sock
db = postfix
db_user = postfix
db_passwd = bscidth46
db_client_flags = 0
default_pass_scheme = CRYPT
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 105 AS uid, 106 AS gi...
2006 Jun 20
1
Extracting a connection out of ActiveRecord::Base
...ActiveRecord stuff):
self.connection = ActiveRecord::Base.connection
if self.options.include?(:db_adapter)
typo_conn = ActiveRecord::Base.connection
ActiveRecord::Base.establish_connection(
:adapter => self.options[:db_adapter],
:host => self.options[:db_host],
:username => self.options[:db_username],
:password => self.options[:db_password],
:database => self.options[:wp_db]
)
self.connection = ActiveRecord::Base.connection
ActiveRecord::Base.connection = typo_conn
puts "connected."
e...
2009 Jun 25
2
[PATCH] Fix dbomatic state changes.
...it either before
- # or after. If the node was rebooted, the VMs will all
- # be gone and dbomatic won't see them so we need to set
- # them to stopped.
- db_vm = Vm.find(:all, :conditions => ["host_id = ? AND state = ?", db_host.id, Vm::STATE_UNREACHABLE])
- db_vm.each do |vm|
- @logger.info "Moving vm #{vm.description} in state #{vm.state} to state stopped."
- vm.state = Vm::STATE_STOPPED
- vm.save!
+ Thread.new do
+...
2007 Oct 21
2
cmd mysql
Hey everybody,
I've been using mysql databases more and more. I've run across a couple
of instances where I've either made a mistake on the ip address of the
mysql database or for whatever reason, mysql wasn't running. In those
instances, I've noted that the mysql command will hang indefinitely
(I've counted to 40 before killing it).
The offending line is:
exten =>
2005 Jul 15
0
Queue_log stats
...efault NULL,
# action text,
# info1 text,
# info2 text,
# info3 text,
# timestamp int(11) NOT NULL default '0',
# id tinytext NOT NULL
#) TYPE=MyISAM;
use DBI;
use IO::File;
my $opt_debug = 0;
# if you want postgres change this to "Pg"
my $db_type = "mysql";
my $db_host = "127.0.0.1";
my $db_user_name = 'username';
my $db_password = 'password';
my $db_database = 'asteriskstat';
my $dbh = DBI->connect("DBI:$db_type:dbname=$db_database;host=
$db_host;", $db_user_name, $db_password);
open(FIFO, "< /var/log/ast...
2008 Jan 16
3
question about mysql authentication
Hi list,
i use dovecot-1.0-1.2.rc15.el5 installed from rpm
centos 5.0
I cant get mysql authetication working: this is my /etc/dove-mysql.conf
######dove-mysql.conf should look like this##########
#db_host = 127.0.0.1
#db_port = 3306
db = postfix
db_user = postfix
db_passwd = secret
db_client_flags = 0
default_pass_scheme = PLAIN
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' a...
2009 Nov 04
4
[PATCH server] Update daemons to use new QMF.
...uot;, 'uuid' => vm.uuid))
if qmf_vm
- qmf_host = @session.object(:class => "node", :object_id => qmf_vm.node)
+ qmf_host = @qmfc.object(Qmf::Query.new(:class => "node", :object_id => qmf_vm.node))
db_host = Host.find(:first, :conditions => ['hostname = ?', qmf_host.hostname])
@logger.info "VM #{vm.description} is running on node #{db_host.hostname}"
vm.host_id = db_host.id
@@ -273,7 +276,7 @@ class DbOmatic < Qpid::Qmf::Console...
2009 Jul 24
1
permit many-to-many vms / networks relationship redux
redux patchset permitting a vm to be associated with
multiple networks and vice-versa. updated patchset so
as to be applicable against current oVirt server HEAD
these patches may be applied in any order, they all
need to be pushed together
2010 Sep 02
1
[PATCH 1/1] Introduce an option to always pxe-boot a vm.
...erface.
db_vm.memory_used = db_vm.memory_allocated
- db_vm.boot_device = Vm::BOOT_DEV_HD
+ # Revert to HD booting unless we have selected to always boot from the network.
+ db_vm.boot_device = Vm::BOOT_DEV_HD unless db_vm.boot_device == Vm::BOOT_DEV_NETWORK_ALWAYS
db_vm.host_id = db_host.id
db_vm.save!
--
1.7.2.1