Merge lp:~jseutter/landscape-client/autodiscover-questions into lp:~landscape/landscape-client/trunk

Proposed by Jerry Seutter
Status: Merged
Approved by: Alberto Donato
Approved revision: 458
Merge reported by: Jerry Seutter
Merged at revision: not available
Proposed branch: lp:~jseutter/landscape-client/autodiscover-questions
Merge into: lp:~landscape/landscape-client/trunk
Prerequisite: lp:~jseutter/landscape-client/assert-equal-2
Diff against target: 81 lines (+38/-1)
3 files modified
debian/landscape-client.config (+6/-0)
debian/landscape-client.postinst (+10/-1)
debian/landscape-client.templates (+22/-0)
To merge this branch: bzr merge lp:~jseutter/landscape-client/autodiscover-questions
Reviewer Review Type Date Requested Status
Alberto Donato (community) Approve
Geoff Teale (community) Approve
Review via email: mp+91958@code.launchpad.net

This proposal supersedes a proposal from 2012-02-08.

Description of the change

This branch adds questions to debconf for server autodiscovery. It asks 3 questions:
- should server autodiscovery be done?
- What string should be used for DNS SRV queries (default to _landscape._tcp.localdomain)
- What string should be used for DNS A queries (default to landscape.localdomain)

I don't have any experience with this so I could be doing something dubious, dastardly or even diabolical.

To post a comment you must log in.
Revision history for this message
Geoff Teale (tealeg) wrote :

+1 Well it looks good to me.

One thing, why the question mark? (naive question)

+_Description: Enable server autodiscovery?

review: Approve
Revision history for this message
Jerry Seutter (jseutter) wrote :

> +1 Well it looks good to me.
>
> One thing, why the question mark? (naive question)
>
> +_Description: Enable server autodiscovery?

When I ran through dpkg-reconfigure it seemed to make more sense. In this case it is a Yes/No answer rather than a "use this string" answer, hence why I used the question mark.

Revision history for this message
Alberto Donato (ack) wrote :

#1:
+ db_set $PACKAGE/server_autodiscover $TAGS
+ db_set $PACKAGE/autodiscover_srv_query_string $TAGS
+ db_set $PACKAGE/autodiscover_a_query_string $TAGS

I guess a copy/paste error, $TAGS is used in place of the correct variables.

Beside that, looks good, +1!

review: Approve
459. By Jerry Seutter

Fixing bugs in landscape-client.config

460. By Jerry Seutter

Transmitting new settings from debconf back to landscape-client.

461. By Jerry Seutter

Adding a default setting to the templates file

462. By Jerry Seutter

Merge from trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/landscape-client.config'
2--- debian/landscape-client.config 2012-02-14 21:22:39 +0000
3+++ debian/landscape-client.config 2012-02-24 01:18:21 +0000
4@@ -48,6 +48,9 @@
5 update_var "https_proxy" "$CONFIGFILE"
6 update_var "otp" "$CONFIGFILE"
7 update_var "tags" "$CONFIGFILE"
8+ update_var "server_autodiscover" "$CONFIGFILE"
9+ update_var "autodiscover_srv_query_string" "$CONFIGFILE"
10+ update_var "autodiscover_a_query_string" "$CONFIGFILE"
11 fi
12
13 # Ask questions.
14@@ -61,5 +64,8 @@
15 db_input "$priority" $PACKAGE/computer_title || true
16 db_input "$priority" $PACKAGE/account_name || true
17 db_input "$priority" $PACKAGE/registration_password || true
18+db_input "$priority" $PACKAGE/server_autodiscover || true
19+db_input "$priority" $PACKAGE/autodiscover_srv_query_string || true
20+db_input "$priority" $PACKAGE/autodiscover_a_query_string || true
21 db_go || true
22
23
24=== modified file 'debian/landscape-client.postinst'
25--- debian/landscape-client.postinst 2012-02-13 21:07:42 +0000
26+++ debian/landscape-client.postinst 2012-02-24 01:18:21 +0000
27@@ -56,6 +56,12 @@
28 OTP="${RET}"
29 db_get $PACKAGE/tags
30 TAGS="${RET}"
31+ db_get $PACKAGE/server_autodiscover
32+ SERVER_AUTODISCOVER="${RET}"
33+ db_get $PACKAGE/autodiscover_srv_query_string
34+ AUTODISCOVER_SRV_QUERY_STRING="${RET}"
35+ db_get $PACKAGE/autodiscover_a_query_string
36+ AUTODISCOVER_A_QUERY_STRING="${RET}"
37
38 # Create new configuration, with private mode
39 TEMPFILE=$(mktemp -p /etc/landscape)
40@@ -80,7 +86,10 @@
41 --http-proxy "$HTTP_PROXY" \
42 --https-proxy "$HTTPS_PROXY" \
43 --otp "$OTP" \
44- --tags "$TAGS"
45+ --tags "$TAGS" \
46+ --server-autodiscover "$SERVER_AUTODISCOVER" \
47+ --autodiscover-srv-query-string "$AUTODISCOVER_SRV_QUERY_STRING" \
48+ --autodiscover-a-query-string "$AUTODISCOVER_A_QUERY_STRING"
49
50 # If we got the needed information, actually do the registration.
51 if [ -n "$ACCOUNT_NAME" -a -n "$COMPUTER_TITLE" ]; then
52
53=== modified file 'debian/landscape-client.templates'
54--- debian/landscape-client.templates 2011-10-20 10:59:10 +0000
55+++ debian/landscape-client.templates 2012-02-24 01:18:21 +0000
56@@ -83,3 +83,25 @@
57 Register this system with a preexisting Landscape account. Please
58 go to http://landscape.canonical.com if you need a Landscape account.
59
60+Template: landscape-client/server_autodiscover
61+Type: boolean
62+Default: false
63+_Description: Enable server autodiscovery?
64+ Enable DNS searches to discover the hostname of a Landscape Dedicated
65+ Server.
66+
67+Template: landscape-client/autodiscover_srv_query_string
68+Type: string
69+Default: _landscape._tcp.localdomain
70+_Description: DNS SRV query string for discovering the server name:
71+ When server autodiscovery is enabled, this string is used to make a
72+ DNS SRV query to find the location of the Landscape server. This
73+ will override portions of the ping url and https url settings.
74+
75+Template: landscape-client/autodiscover_a_query_string
76+Type: string
77+Default: landscape.localdomain
78+_Description: DNS A name query string for discovering the server name:
79+ When server autodiscovery is enabled, this string is used to make a
80+ DNS A name query to find the location of the Landscape server. This
81+ will override portions of the ping url and https url settings.

Subscribers

People subscribed via source and target branches

to all changes: