Skip to contentSkip to conversation

xend-config.sxp (-unstable tree)

PATCH In review aq 3 participants 4 messages May 31, 2005

lore
Share & tools
lore

aq

author
#0 lore raw

PATCH 1/1 xend-config.sxp (-unstable tree)

This patch (against -unstable [email protected]) does the followings:

- put some configurable variables to xend_config.sxp, and set them to default values. That will make people aware of their existence, and let them easily reconfigure xend when needed.
- set some daemon addresses to 'localhost' instead of empty string, which makes them more secure by default.
- add one comment and fix some wrong comments in XendRoot.py

$ diffstat xend_config.unstable.patch 
 examples/xend-config.sxp    |   28 ++++++++++++++++++++++++++++
 python/xen/xend/XendRoot.py |   14 ++++++--------
 2 files changed, 34 insertions(+), 8 deletions(-)

===== tools/examples/xend-config.sxp 1.6 vs edited =====

tools/examples/xend-config.sxp +28 -0
@@ -1,5 +1,8 @@
 # Xend configuration file.
 
+# Default for the flag indicating whether xend should run an http server.
+(xend-http-server 'no')
+
 # Port xend should use for the HTTP interface.
 (xend-port         8000)
 
@@ -44,3 +47,28 @@
 # Setup script for enbd-backed block devices
 (block-enbd block-enbd)
 
+# Default path to the root of the database.
+(dbroot "/var/lib/xen/xend-db")
+
+# Default path to the log file.
+(logfile "/var/log/xend.log")
+
+# Default level of information to be logged.
+(loglevel 'DEBUG')
+
+# Default for the flag indicating whether xend should run a relocation server.
+(xend-relocation-server 'yes')
+
+# Default interface address xend listens at for its relocation server.
+# If this is set to 'localhost' only the localhost will be able to connect
+# to its relocation server.
+(xend-relocation-address 'localhost')
+
+# Default port xend listens at for connection to its relocation server.
+(xend-relocation-port '8002')
+
+# Default for the flag indicating whether xend should run a unix-domain server.
+(xend-unix-server 'yes')
+
+# Default path the unix-domain server listens at.
+(xend-unix-path '/var/lib/xend/xend-socket')

===== tools/python/xen/xend/XendRoot.py 1.22 vs edited =====

tools/python/xen/xend/XendRoot.py +6 -8
@@ -43,19 +43,20 @@
     """Default path to the log file. """
     logfile_default = "/var/log/xend.log"
 
+    """Default level of information to be logged. """
     loglevel_default = 'DEBUG'
 
     """Default for the flag indicating whether xend should run an http server."""
     xend_http_server_default = 'no'
 
     """Default interface address xend listens at. """
-    xend_address_default      = ''
+    xend_address_default      = 'localhost'
 
     """Default for the flag indicating whether xend should run a relocation server."""
     xend_relocation_server_default = 'yes'
 
     """Default interface address the xend relocation server listens at. """
-    xend_relocation_address_default = ''
+    xend_relocation_address_default = 'localhost'
 
     """Default port xend serves HTTP at. """
     xend_port_default         = '8000'
@@ -73,7 +74,7 @@
     xend_unix_path_default = '/var/lib/xend/xend-socket'
 
     """Default interface address xend listens at for consoles."""
-    console_address_default   = ''
+    console_address_default   = 'localhost'
 
     """Default port xend serves consoles at. """
     console_port_base_default = '9600'
@@ -280,17 +281,15 @@
 
     def get_xend_address(self):
         """Get the address xend listens at for its HTTP and event ports.
-        This defaults to the empty string which allows all hosts to connect.
         If this is set to 'localhost' only the localhost will be able to connect
         to the HTTP and event ports.
         """
         return self.get_config_value('xend-address', self.xend_address_default)
 
     def get_xend_relocation_address(self):
-        """Get the address xend listens at for its HTTP and event ports.
-        This defaults to the empty string which allows all hosts to connect.
+        """Get the interface address xend listens at for connection to its relocation server.
         If this is set to 'localhost' only the localhost will be able to connect
-        to the HTTP and event ports.
+        to its relocation server.
         """
         return self.get_config_value('xend-relocation-address', self.xend_relocation_address_default)
 
@@ -306,7 +305,6 @@
 
     def get_console_address(self):
         """Get the address xend listens at for its console ports.
-        This defaults to the empty string which allows all hosts to connect.
         If this is set to 'localhost' only the localhost will be able to connect
         to the console ports.
         """

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines · aq

This patch (against -unstable [email protected]) does the followings:

- put some configurable variables to xend_config.sxp, and set them to default values. That will make people aware of their existence, and let them easily reconfigure xend when needed.

I've not applied this part because we're not sure we're going to keep some of these.
I'd rather see these documented in the documentation.

Quoted 2 lines

- set some daemon addresses to 'localhost' instead of empty string, which makes them more secure by default.

I've only changed this for the consoles, the http server is off by default and if you switch it on, you'll most likely want to access it from another machine. Changing the default for the relocation server to be localhost makes absolutely not sense ;-)

Quoted 1 line

- add one comment and fix some wrong comments in XendRoot.py

Thanks!

christian

author
#2 lore raw
Quoted 9 lines · Christian Limpach
Quoted 5 lines · aq

This patch (against -unstable [email protected]) does the followings:

- put some configurable variables to xend_config.sxp, and set them to default values. That will make people aware of their existence, and let them easily reconfigure xend when needed.

I've not applied this part because we're not sure we're going to keep some of these.

i see the point, but how about part of this patch in -testing tree (see http://lists.xensource.com/archives/html/xen-devel/2005-05/msg01204.html).
i believe that those options are stable, so if you apply -testing patch (this -testing patch got no comment), we should keep the same options in this patch, and not reject them all.

regards,
aq

#3 lore raw
Quoted 8 lines · aq
Quoted 7 lines · Christian Limpach
Quoted 5 lines · aq

This patch (against -unstable [email protected]) does the followings:

- put some configurable variables to xend_config.sxp, and set them to default values. That will make people aware of their existence, and let them easily reconfigure xend when needed.

Quoted 8 lines
Quoted 2 lines

I've not applied this part because we're not sure we're going to keep some of these.

i see the point, but how about part of this patch in -testing tree (see http://lists.xensource.com/archives/html/xen-devel/2005-05/msg01204.html).
i believe that those options are stable, so if you apply -testing patch (this -testing patch got no comment), we should keep the same options in this patch, and not reject them all.

I think those are rather obscure options and we don't really want to encourage people to change them...

christian