You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2009/12/14 22:28:18 UTC

[jira] Commented: (TS-6) traffic_manager does not start

    [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790381#action_12790381 ] 

Leif Hedstrom commented on TS-6:
--------------------------------

Couple of comments:

+ $(INSTALL) -d -o nobody -g nobody $(pkglocalstatedir) $(pkglogdir) $(pkgsysconfdir) $(pkgsysconfdir)/internal
+ $(INSTALL) -d $(pkglibexecdir)
+ echo $(prefix) > /etc/traffic_server


We need to try to avoid hardcoding nobody / nobody, and use something in autoconf to specify this. There's a separate Jira ticket filed for tihs as well, TS-15. It'd be great to get something for this as well (if you want to leave this as is for this diff, and work on TS-15 next, that's fine :).


Should we make this a little longer than 512? Maybe 1024 ?

+#define PATH_NAME_MAX 511 // instead of PATH_MAX which is inconsistent
+ // on various OSs (linux-4096,osx/bsd-1024,


That, or I'd say we should stick to PATH_MAX, and use the limitations as per each OS (which is fine IMO). That would be my preference I think, and the more I think about it, the more it makes sense to stick to the system defaults. This happens in several places in the diff.


For this:

+ if ((env_path = getenv("ATS_ROOT")) || (env_path = getenv("ATS_INST_ROOT"))) {
+ ink_strncpy(ts_path, env_path, PATH_NAME_MAX);

I think ATS_ROOT is adequate. The old "INST_ROOT" was added to deal with an internal "anomaly" (this occurs in several places). We should also document this usage of $TS_ROOT somewhere, and make sure we use it consistently throughout the code. I think though, that I'd prefer TS_ROOT instead of ATS_, but if you want to discuss that on the -dev@ mailing list, that's cool too.


This stuff:

+ if ((fp = fopen("/etc/traffic_server", "r")) != NULL) {
+ if (fgets(ts_path, PATH_NAME_MAX, fp) == NULL) {
+ fclose(fp);
+ Cli_Error("\nInvalid contents in /etc/traffic_server\n");
+ Cli_Error(" Please set correct path in either env variable ATS_ROOT or in /etc/traffic_server \n");
+ return -1;
+ }


Shouldn't /etc/traffic_server "default" to whatever --prefix was specified? So, in the default, it would be /usr/local/etc/trafficserver (note that it's not traffic_server either). I think we should change every reference to /etc/traffic_server (or /etc/trafficserver) to be $prefix/etc/trafficserver, this happens in many places in the code.


> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff, TS-6_traffic_manager_patch2.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.