[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15353365#comment-15353365
 ] 

ASF GitHub Bot commented on TS-4518:


Github user zwoop closed the pull request at:

https://github.com/apache/trafficserver/pull/755


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15353363#comment-15353363
 ] 

ASF subversion and git services commented on TS-4518:
-

Commit 8652504331afd6268552f3197644235cdc51c4f5 in trafficserver's branch 
refs/heads/master from [~zwoop]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=8652504 ]

TS-4518 Eliminate memory leaks in UUID regressions


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15353303#comment-15353303
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/755
  
 


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15353283#comment-15353283
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/755
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/265/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15353273#comment-15353273
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/755
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/370/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15353259#comment-15353259
 ] 

ASF GitHub Bot commented on TS-4518:


GitHub user zwoop opened a pull request:

https://github.com/apache/trafficserver/pull/755

TS-4518 Eliminate memory leaks in UUID regressions



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zwoop/trafficserver TS-4518

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/755.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #755


commit 0651bd992b5cc4ad6c91a67e44f011188adf6dc8
Author: Leif Hedstrom 
Date:   2016-06-28T15:45:37Z

TS-4518 Eliminate memory leaks in UUID regressions




> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351468#comment-15351468
 ] 

ASF subversion and git services commented on TS-4518:
-

Commit 9f774fb656b44930375746e63df1b2cdb583bd18 in trafficserver's branch 
refs/heads/master from [~zwoop]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=9f774fb ]

TS-4518 Add the basic APIs and code for UUIDs


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351407#comment-15351407
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/245/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351406#comment-15351406
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/351/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351404#comment-15351404
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/350/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351400#comment-15351400
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/244/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351366#comment-15351366
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Looks good  


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351365#comment-15351365
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68610169
  
--- Diff: proxy/api/ts/ts.h ---
@@ -2389,6 +2392,19 @@ tsapi const char *TSHttpHookNameLookup(TSHttpHookID 
hook);
 */
 tsapi const char *TSHttpEventNameLookup(TSEvent event);
 
+/* APIs for dealing with UUIDs, either self made, or the system wide 
process UUOD. See
--- End diff --

s/UUOD/UUID/


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351362#comment-15351362
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68609628
  
--- Diff: doc/developer-guide/api/types/TSUuid.en.rst ---
@@ -0,0 +1,48 @@
+.. Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed
+   with this work for additional information regarding copyright
+   ownership.  The ASF licenses this file to you under the Apache
+   License, Version 2.0 (the "License"); you may not use this file
+   except in compliance with the License.  You may obtain a copy of
+   the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied.  See the License for the specific language governing
+   permissions and limitations under the License.
+
+.. include:: ../../../common.defs
+
+TSUuid
+**
+
+Synopsis
+
+
+`#include `
--- End diff --

Oh I see there are separate pages for the types ... ok then  


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351358#comment-15351358
 ] 

ASF GitHub Bot commented on TS-4518:


Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68609243
  
--- Diff: doc/developer-guide/api/types/TSUuid.en.rst ---
@@ -0,0 +1,48 @@
+.. Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed
+   with this work for additional information regarding copyright
+   ownership.  The ASF licenses this file to you under the Apache
+   License, Version 2.0 (the "License"); you may not use this file
+   except in compliance with the License.  You may obtain a copy of
+   the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied.  See the License for the specific language governing
+   permissions and limitations under the License.
+
+.. include:: ../../../common.defs
+
+TSUuid
+**
+
+Synopsis
+
+
+`#include `
--- End diff --

That was copied from existing docs.


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351359#comment-15351359
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68609258
  
--- Diff: doc/developer-guide/api/types/TSUuid.en.rst ---
@@ -0,0 +1,48 @@
+.. Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed
+   with this work for additional information regarding copyright
+   ownership.  The ASF licenses this file to you under the Apache
+   License, Version 2.0 (the "License"); you may not use this file
+   except in compliance with the License.  You may obtain a copy of
+   the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied.  See the License for the specific language governing
+   permissions and limitations under the License.
+
+.. include:: ../../../common.defs
+
+TSUuid
+**
+
+Synopsis
+
+
+`#include `
--- End diff --

Consider just including this text in the other man page?


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351357#comment-15351357
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68609126
  
--- Diff: doc/developer-guide/api/types/TSUuid.en.rst ---
@@ -0,0 +1,48 @@
+.. Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed
+   with this work for additional information regarding copyright
+   ownership.  The ASF licenses this file to you under the Apache
+   License, Version 2.0 (the "License"); you may not use this file
+   except in compliance with the License.  You may obtain a copy of
+   the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied.  See the License for the specific language governing
+   permissions and limitations under the License.
+
+.. include:: ../../../common.defs
+
+TSUuid
+**
+
+Synopsis
+
+
+`#include `
--- End diff --

We should just use  everywhere.


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351355#comment-15351355
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68608958
  
--- Diff: doc/developer-guide/api/functions/TSUuidCreate.en.rst ---
@@ -0,0 +1,138 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+.. include:: ../../../common.defs
+
+.. default-domain:: c
+
+TSUuidCreate
+
+
+Traffic Server UUID construction APIs.
+
+Synopsis
+
+
+`#include `
+
+.. function:: TSUuid TSUuidCreate(void);
+.. function:: TSReturnCode TSUuidInitialize(TSUuid uuid, TSUuidVersion v);
+.. function:: void TSUuidDestroy(TSUuid uuid);
+.. function:: TSReturnCode TSUuidCopy(TSUuid dest, const TSUuid src);
+.. function:: const char *TSUuidStringGet(const TSUuid uuid);
+.. function:: TSUuidVersion TSUuidVersionGet(const TSUuid uuid);
+.. function:: TSReturnCode TSUuidStringParse(TSUuid uuid, const char 
*uuid_str);
+.. function:: const TSUuid TSProcessUuidGet(void);
+
+Description
+===
+
+These APIs are used to create, manage, and use UUIDs in a plugin, 
implementing
+part of RFC 4122. Currently, only the V4 variant of the specifications is
+implemented. In addition, an internal, process unique UUID is provided, 
which
+can be used to uniquely identifying the running Traffic Server process.
+
+:func:`TSUuidCreate` creates a new :type:`TSUuid` object, which is returned
+and can be used by the other APIs. Similarly, a read-only global process 
UUID
+is returned from the function :func:`TSProcessUuidGet`. You must not 
attempt
+to modify any data as returned by either of these functions.
+
+:func:`TSUuidInitialize` initializes a :type:`TSUuid` object, using the
+algorithm defined for the specified version. Note that only the V4 
variants is
+currently supported. You can call :func:`TSUuidInitialize` repeatedly, 
which
+each generates a new UUID, but this will overwrite any existing UUID data 
in
+the object. This also implies that any strings retrieved using
+:func:`TSUuidStringGet` are also modified accordingly.
+
+:func:`TSUuidDestroy` destroys (releases) an :type:`TSUuid` object, and 
frees
+all memory associated with this object. This includes any strings as 
returned
+by e.g. :func:`TSUuidStringGet`.
+
+:func:`TSUuidCopy` copies one :type:`TSUuid` to another, making an exact
+duplicate. Note that both the source and the destination UUIDs must be 
created
+appropriately, and should not have been previously destroyed.
+
+:func:`TSUuidVersionGet` returns the version number for the
+:type:`TSUuid`. This will work properly for any RFC 4122 initialized UUID
+object, e.g. if you parse a string with :func:`TSUuidStringParse` this will
+return the correct variant ID.
+
+:func:`TSUuidStringGet` returns a pointer to the internal string
+representation of the :type:`TSUuid` object. It's important to know that 
there
+is no transfer of ownership of this string. If you need a copy of it, you 
are
+responsible of doing so yourself. In particular, using a string as 
returned by
+:func:`TSUuidStringGet` **after** you have called :func:`TSUuidDestroy` on 
the
+corresponding :type:`TSUuid` object is a serious error. The UUID object 
does
+not do any sort of reference counting on the string, and you must 
absolutely
+not free the memory as returned by this API.
+
+Finally, :func:`TSUuidStringParse` can be used to convert an existing
+:type:`TSUuid` string to a Traffic Server UUID object. This will only 
succeed
+if the :type:`TSUuid` string is a proper *RFC 4122* UUID. The 
:type:`TSUuid`
+argument passed to this function must be a properly :func:`TSUuidCreate`
+object, but it does not need to be previously initialized.
+

[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15351354#comment-15351354
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68608955
  
--- Diff: doc/developer-guide/api/functions/TSUuidCreate.en.rst ---
@@ -0,0 +1,138 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+.. include:: ../../../common.defs
+
+.. default-domain:: c
+
+TSUuidCreate
+
+
+Traffic Server UUID construction APIs.
+
+Synopsis
+
+
+`#include `
+
+.. function:: TSUuid TSUuidCreate(void);
+.. function:: TSReturnCode TSUuidInitialize(TSUuid uuid, TSUuidVersion v);
+.. function:: void TSUuidDestroy(TSUuid uuid);
+.. function:: TSReturnCode TSUuidCopy(TSUuid dest, const TSUuid src);
+.. function:: const char *TSUuidStringGet(const TSUuid uuid);
+.. function:: TSUuidVersion TSUuidVersionGet(const TSUuid uuid);
+.. function:: TSReturnCode TSUuidStringParse(TSUuid uuid, const char 
*uuid_str);
+.. function:: const TSUuid TSProcessUuidGet(void);
+
+Description
+===
+
+These APIs are used to create, manage, and use UUIDs in a plugin, 
implementing
+part of RFC 4122. Currently, only the V4 variant of the specifications is
+implemented. In addition, an internal, process unique UUID is provided, 
which
+can be used to uniquely identifying the running Traffic Server process.
+
+:func:`TSUuidCreate` creates a new :type:`TSUuid` object, which is returned
+and can be used by the other APIs. Similarly, a read-only global process 
UUID
+is returned from the function :func:`TSProcessUuidGet`. You must not 
attempt
+to modify any data as returned by either of these functions.
+
+:func:`TSUuidInitialize` initializes a :type:`TSUuid` object, using the
+algorithm defined for the specified version. Note that only the V4 
variants is
+currently supported. You can call :func:`TSUuidInitialize` repeatedly, 
which
+each generates a new UUID, but this will overwrite any existing UUID data 
in
+the object. This also implies that any strings retrieved using
+:func:`TSUuidStringGet` are also modified accordingly.
+
+:func:`TSUuidDestroy` destroys (releases) an :type:`TSUuid` object, and 
frees
+all memory associated with this object. This includes any strings as 
returned
+by e.g. :func:`TSUuidStringGet`.
+
+:func:`TSUuidCopy` copies one :type:`TSUuid` to another, making an exact
+duplicate. Note that both the source and the destination UUIDs must be 
created
+appropriately, and should not have been previously destroyed.
+
+:func:`TSUuidVersionGet` returns the version number for the
+:type:`TSUuid`. This will work properly for any RFC 4122 initialized UUID
+object, e.g. if you parse a string with :func:`TSUuidStringParse` this will
+return the correct variant ID.
+
+:func:`TSUuidStringGet` returns a pointer to the internal string
+representation of the :type:`TSUuid` object. It's important to know that 
there
+is no transfer of ownership of this string. If you need a copy of it, you 
are
+responsible of doing so yourself. In particular, using a string as 
returned by
+:func:`TSUuidStringGet` **after** you have called :func:`TSUuidDestroy` on 
the
+corresponding :type:`TSUuid` object is a serious error. The UUID object 
does
+not do any sort of reference counting on the string, and you must 
absolutely
+not free the memory as returned by this API.
+
+Finally, :func:`TSUuidStringParse` can be used to convert an existing
+:type:`TSUuid` string to a Traffic Server UUID object. This will only 
succeed
+if the :type:`TSUuid` string is a proper *RFC 4122* UUID. The 
:type:`TSUuid`
+argument passed to this function must be a properly :func:`TSUuidCreate`
+object, but it does not need to be previously initialized.
+

[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350340#comment-15350340
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/348/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350338#comment-15350338
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/242/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350336#comment-15350336
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/241/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350333#comment-15350333
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
FreeBSD build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/347/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350329#comment-15350329
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
FreeBSD build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/346/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15350308#comment-15350308
 ] 

ASF GitHub Bot commented on TS-4518:


Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68513514
  
--- Diff: proxy/InkAPI.cc ---
@@ -8941,3 +8942,110 @@ TSVConnReenable(TSVConn vconn)
 }
   }
 }
+
+// APIs for managing and using UUIDs.
+TSUuid
+TSUuidCreate(void)
+{
+  ATSUuid *uuid = new ATSUuid();
+  return (TSUuid)uuid;
+}
+
+TSReturnCode
+TSUuidDestroy(TSUuid uuid)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive()) {
--- End diff --

It used to do more, but not it just does a poor amount of sanity check, and 
it certainly can not be a guarantee. It could not be a false negative though. 
It'd probably make more sense if the data was on a freelist, maybe.


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348684#comment-15348684
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Looks pretty good to me. I just had some minor comments, mainly style 
suggestions.

 


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348676#comment-15348676
 ] 

ASF GitHub Bot commented on TS-4518:


Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68465162
  
--- Diff: proxy/InkAPI.cc ---
@@ -8941,3 +8942,110 @@ TSVConnReenable(TSVConn vconn)
 }
   }
 }
+
+// APIs for managing and using UUIDs.
+TSUuid
+TSUuidCreate(void)
+{
+  ATSUuid *uuid = new ATSUuid();
+  return (TSUuid)uuid;
+}
+
+TSReturnCode
+TSUuidDestroy(TSUuid uuid)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive()) {
+delete u;
+return TS_SUCCESS;
+  }
+
+  return TS_ERROR;
+}
+
+TSReturnCode
+TSUuidCopy(TSUuid dest, const TSUuid src)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)dest) == TS_SUCCESS);
+  sdk_assert(sdk_sanity_check_null_ptr((void *)src) == TS_SUCCESS);
+
+  ATSUuid *d = (ATSUuid *)dest;
+  ATSUuid *s = (ATSUuid *)src;
+
+  if (d->alive() && s->alive() && s->valid()) {
+*d = *s;
+return TS_SUCCESS;
+  }
+
+  return TS_ERROR;
+}
+
+TSReturnCode
+TSUuidInitialize(TSUuid uuid, TSUuidVersion v)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive()) {
+u->initialize(v);
+return u->valid() ? TS_SUCCESS : TS_ERROR;
+  }
+
+  return TS_ERROR;
+}
+
+const TSUuid
+TSProcessUuidGet(void)
+{
+  Machine *machine = Machine::instance();
+  return (TSUuid)(>uuid);
+}
+
+const char *
+TSUuidStringGet(const TSUuid uuid)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)(uuid);
+
+  if (u->alive() && u->valid()) {
+return u->getString();
+  }
+
+  return NULL;
+}
+
+TSReturnCode
+TSUuidStringParse(TSUuid uuid, const char *str)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  sdk_assert(sdk_sanity_check_null_ptr((void *)str) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive() && u->parseString(str)) {
+return TS_SUCCESS;
+  }
+
+  return TS_ERROR;
+}
+
+TSUuidVersion
+TSUuidVersionGet(TSUuid uuid)
+{
--- End diff --

Sanity check?


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348670#comment-15348670
 ] 

ASF GitHub Bot commented on TS-4518:


Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68464791
  
--- Diff: proxy/Main.cc ---
@@ -1674,6 +1674,9 @@ main(int /* argc ATS_UNUSED */, const char **argv)
 machine_addr.assign(HttpConfig::m_master.inbound_ip6);
   Machine::init(0, _addr.sa);
 
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.uuid", 
(char *)Machine::instance()->uuid.getString(),
+RECP_NON_PERSISTENT);
--- End diff --

Sure :).


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348663#comment-15348663
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68464518
  
--- Diff: proxy/Main.cc ---
@@ -1674,6 +1674,9 @@ main(int /* argc ATS_UNUSED */, const char **argv)
 machine_addr.assign(HttpConfig::m_master.inbound_ip6);
   Machine::init(0, _addr.sa);
 
+  RecRegisterStatString(RECT_PROCESS, "proxy.process.version.server.uuid", 
(char *)Machine::instance()->uuid.getString(),
+RECP_NON_PERSISTENT);
--- End diff --

Shall we file a separate JIRA to make ``RecRegisterStatString`` take a 
const value since it is copied?


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348656#comment-15348656
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68464221
  
--- Diff: proxy/InkAPI.cc ---
@@ -8941,3 +8942,110 @@ TSVConnReenable(TSVConn vconn)
 }
   }
 }
+
+// APIs for managing and using UUIDs.
+TSUuid
+TSUuidCreate(void)
+{
+  ATSUuid *uuid = new ATSUuid();
+  return (TSUuid)uuid;
+}
+
+TSReturnCode
+TSUuidDestroy(TSUuid uuid)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive()) {
+delete u;
+return TS_SUCCESS;
+  }
+
+  return TS_ERROR;
+}
+
+TSReturnCode
+TSUuidCopy(TSUuid dest, const TSUuid src)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)dest) == TS_SUCCESS);
+  sdk_assert(sdk_sanity_check_null_ptr((void *)src) == TS_SUCCESS);
+
+  ATSUuid *d = (ATSUuid *)dest;
+  ATSUuid *s = (ATSUuid *)src;
+
+  if (d->alive() && s->alive() && s->valid()) {
+*d = *s;
+return TS_SUCCESS;
+  }
+
+  return TS_ERROR;
+}
+
+TSReturnCode
+TSUuidInitialize(TSUuid uuid, TSUuidVersion v)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive()) {
+u->initialize(v);
+return u->valid() ? TS_SUCCESS : TS_ERROR;
+  }
+
+  return TS_ERROR;
+}
+
+const TSUuid
+TSProcessUuidGet(void)
+{
+  Machine *machine = Machine::instance();
+  return (TSUuid)(>uuid);
+}
+
+const char *
+TSUuidStringGet(const TSUuid uuid)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)(uuid);
+
+  if (u->alive() && u->valid()) {
+return u->getString();
+  }
+
+  return NULL;
+}
+
+TSReturnCode
+TSUuidStringParse(TSUuid uuid, const char *str)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  sdk_assert(sdk_sanity_check_null_ptr((void *)str) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive() && u->parseString(str)) {
+return TS_SUCCESS;
+  }
+
+  return TS_ERROR;
+}
+
+TSUuidVersion
+TSUuidVersionGet(TSUuid uuid)
+{
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive()) {
+return u->version();
+  }
+
+  return TS_UUID_UNDEFINED;
+}
+
+// Expose the HttpSM's sequence number (ID)
+uint64_t
+TSHttpTxnIdGet(TSHttpTxn txnp)
+{
--- End diff --

Sanity check?


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348651#comment-15348651
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68464023
  
--- Diff: lib/ts/ink_uuid.h ---
@@ -0,0 +1,122 @@
+/** @file
+ *
+ *  Basic implementation of RFC 4122, see
+ *  https://www.ietf.org/rfc/rfc4122.txt
+ *
+ *  @section license License
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+#include "ts/apidefs.h"
+#include "ts/ink_memory.h"
+
+// This is the C++ portions of things, which will need to get wrapped in 
C-helper APIs.
+class ATSUuid
+{
+public:
+  // Constructors
+  ATSUuid() : _version(TS_UUID_UNDEFINED), _alive(true) {}
+  ~ATSUuid() { _alive = false; }
+  ATSUuid =(const ATSUuid other);
+
+  // Initialize the UUID from a string
+  bool parseString(const char *str);
+  // Initialize a UUID using appropriate logic for the version specified. 
This can be done multiple times.
+  void initialize(TSUuidVersion v);
+
+  // This returns the internal string representation of the UUID, do not 
mess with this string. There is
+  // no transfer of ownership here. See toString() if you wish to make a 
copy.
+  const char *
+  getString() const
+  {
+return valid() ? _string : NULL;
+  }
+
+  // Copy the UUID string to a buffer of sufficient size (be careful)
+  bool toString(char *buf);
--- End diff --

Actually, do you really need this to be public? Callers can just use 
``getString()``?


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348654#comment-15348654
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68464100
  
--- Diff: lib/ts/ink_uuid.h ---
@@ -0,0 +1,122 @@
+/** @file
+ *
+ *  Basic implementation of RFC 4122, see
+ *  https://www.ietf.org/rfc/rfc4122.txt
+ *
+ *  @section license License
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+#include "ts/apidefs.h"
+#include "ts/ink_memory.h"
+
+// This is the C++ portions of things, which will need to get wrapped in 
C-helper APIs.
+class ATSUuid
+{
+public:
+  // Constructors
+  ATSUuid() : _version(TS_UUID_UNDEFINED), _alive(true) {}
+  ~ATSUuid() { _alive = false; }
+  ATSUuid =(const ATSUuid other);
+
+  // Initialize the UUID from a string
+  bool parseString(const char *str);
+  // Initialize a UUID using appropriate logic for the version specified. 
This can be done multiple times.
+  void initialize(TSUuidVersion v);
+
+  // This returns the internal string representation of the UUID, do not 
mess with this string. There is
+  // no transfer of ownership here. See toString() if you wish to make a 
copy.
+  const char *
+  getString() const
--- End diff --

JFWIW, consider ``c_str()`` as a STL-type name for this :)


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348646#comment-15348646
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68463751
  
--- Diff: proxy/InkAPI.cc ---
@@ -8941,3 +8942,110 @@ TSVConnReenable(TSVConn vconn)
 }
   }
 }
+
+// APIs for managing and using UUIDs.
+TSUuid
+TSUuidCreate(void)
+{
+  ATSUuid *uuid = new ATSUuid();
+  return (TSUuid)uuid;
+}
+
+TSReturnCode
+TSUuidDestroy(TSUuid uuid)
+{
+  sdk_assert(sdk_sanity_check_null_ptr((void *)uuid) == TS_SUCCESS);
+  ATSUuid *u = (ATSUuid *)uuid;
+
+  if (u->alive()) {
--- End diff --

If ``alive()`` is false you have a stale pointer right? At which point how 
do you know that it was really not alive?


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348639#comment-15348639
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68463465
  
--- Diff: lib/ts/ink_uuid.h ---
@@ -0,0 +1,122 @@
+/** @file
+ *
+ *  Basic implementation of RFC 4122, see
+ *  https://www.ietf.org/rfc/rfc4122.txt
+ *
+ *  @section license License
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+#include "ts/apidefs.h"
+#include "ts/ink_memory.h"
+
+// This is the C++ portions of things, which will need to get wrapped in 
C-helper APIs.
+class ATSUuid
+{
+public:
+  // Constructors
+  ATSUuid() : _version(TS_UUID_UNDEFINED), _alive(true) {}
+  ~ATSUuid() { _alive = false; }
+  ATSUuid =(const ATSUuid other);
+
+  // Initialize the UUID from a string
+  bool parseString(const char *str);
+  // Initialize a UUID using appropriate logic for the version specified. 
This can be done multiple times.
+  void initialize(TSUuidVersion v);
+
+  // This returns the internal string representation of the UUID, do not 
mess with this string. There is
+  // no transfer of ownership here. See toString() if you wish to make a 
copy.
+  const char *
+  getString() const
+  {
+return valid() ? _string : NULL;
+  }
+
+  // Copy the UUID string to a buffer of sufficient size (be careful)
+  bool toString(char *buf);
--- End diff --

This should be a ``const`` method.

Consider documenting the output buffer size:
```C
bool toString(char buf[36]) const;
```

I don't know how you feel about
```C
bool toString(char ()[36]) const;
```
... probably a bit inflexible ...


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348642#comment-15348642
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68463575
  
--- Diff: lib/ts/ink_uuid.h ---
@@ -0,0 +1,122 @@
+/** @file
+ *
+ *  Basic implementation of RFC 4122, see
+ *  https://www.ietf.org/rfc/rfc4122.txt
+ *
+ *  @section license License
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+#include "ts/apidefs.h"
+#include "ts/ink_memory.h"
+
+// This is the C++ portions of things, which will need to get wrapped in 
C-helper APIs.
+class ATSUuid
+{
+public:
+  // Constructors
+  ATSUuid() : _version(TS_UUID_UNDEFINED), _alive(true) {}
+  ~ATSUuid() { _alive = false; }
+  ATSUuid =(const ATSUuid other);
+
+  // Initialize the UUID from a string
+  bool parseString(const char *str);
+  // Initialize a UUID using appropriate logic for the version specified. 
This can be done multiple times.
+  void initialize(TSUuidVersion v);
+
+  // This returns the internal string representation of the UUID, do not 
mess with this string. There is
+  // no transfer of ownership here. See toString() if you wish to make a 
copy.
+  const char *
+  getString() const
+  {
+return valid() ? _string : NULL;
+  }
+
+  // Copy the UUID string to a buffer of sufficient size (be careful)
+  bool toString(char *buf);
+
+  TSUuidVersion
+  version() const
+  {
+return _version;
+  }
+
+  bool
+  valid() const
+  {
+return (TS_UUID_UNDEFINED != _version);
+  }
+
+  bool
+  alive() const
+  {
+return _alive;
+  }
--- End diff --

What's the use case for ``alive()``?


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15348621#comment-15348621
 ] 

ASF GitHub Bot commented on TS-4518:


Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/736#discussion_r68462180
  
--- Diff: lib/ts/apidefs.h.in ---
@@ -1125,6 +1173,20 @@ extern tsapi const char *const 
TS_NPN_PROTOCOL_GROUP_SPDY;
  */
 extern tsapi const TSMLoc TS_NULL_MLOC;
 
+/* 
--
+   Interface for the UUID APIs. https://www.ietf.org/rfc/rfc4122.txt. */
+typedef enum {
+  TS_UUID_UNDEFINED = 0,
+  TS_UUID_V1 = 1,
+  TS_UUID_V2,
+  TS_UUID_V3,
+  TS_UUID_V4, /* At this point, this is the only implemented version (or 
variant) */
+  TS_UUID_V5,
+} TSUuidVersion;
+
+#define TSUuidStringLen 36
--- End diff --

This should be ``TS_UUID_STRING_LEN`` to be consistent with 
``TS_MAX_USER_NAME_LEN``, which is the only precedent I could find :)


> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15347246#comment-15347246
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/228/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15347232#comment-15347232
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/334/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15347214#comment-15347214
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/333/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15347189#comment-15347189
 ] 

ASF GitHub Bot commented on TS-4518:


Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/736
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/227/ for details.
 



> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TS-4518) UUID and HttpSM ID APIs and Machine support for a process UUID

2016-06-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15347183#comment-15347183
 ] 

ASF GitHub Bot commented on TS-4518:


GitHub user zwoop opened a pull request:

https://github.com/apache/trafficserver/pull/736

TS-4518 Add the basic APIs and code for UUIDs

This implements the UUID stuff, as well as exposing the TXN ID in a TS API.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zwoop/trafficserver TS-4518

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/736.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #736


commit 5e272bd22ac2c51dc7c38fd762fb0ae10460bcf0
Author: Leif Hedstrom 
Date:   2016-06-11T04:03:35Z

TS-4518 Add the basic APIs and code for UUIDs




> UUID and HttpSM ID APIs and Machine support for a process UUID
> --
>
> Key: TS-4518
> URL: https://issues.apache.org/jira/browse/TS-4518
> Project: Traffic Server
>  Issue Type: New Feature
>  Components: Core, TS API
>Reporter: Leif Hedstrom
>Assignee: Leif Hedstrom
> Fix For: 7.0.0
>
>
> As was discussed on https://github.com/apache/trafficserver/pull/199, I've 
> started the work to generalize this, and breaking it up in various parts.
> This first Jira is about adding four things:
> 1) An internal process UUID, which goes into Machine. It's accessible from 
> the core.
> 2) An API to get this Machine UUID.
> 3) A set of generic UUID APIs, to do things like stringification, Copy() etc.
> 4) A very simple API that exposes the HttpSM's sequences number (sm_id).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)